Define one step of a content format carried by an object type.
The type's schema must mark its version field with ContentVersionAnnotation. Steps chain by version: an object at from is upgraded through every step reachable from it.
from
const sceneParams = Migration.defineContent({ type: Drawing.Canvas, from: 'dxos.org/scene/1', to: 'dxos.org/scene/2', since: '0.11.0', transform: ({ content }) => ({ content: upgradeRecords(content) }),}); Copy
const sceneParams = Migration.defineContent({ type: Drawing.Canvas, from: 'dxos.org/scene/1', to: 'dxos.org/scene/2', since: '0.11.0', transform: ({ content }) => ({ content: upgradeRecords(content) }),});
O(fields) at definition time; walks the schema's top-level properties.
Define one step of a content format carried by an object type.
The type's schema must mark its version field with ContentVersionAnnotation. Steps chain by version: an object at
fromis upgraded through every step reachable from it.