Define a migration between two object schemas.
const migration = Migration.define({ from: ContactV1, to: ContactV2, transform: async (from) => ({ name: `${from.firstName} ${from.lastName}` }), onMigration: async () => {},}); Copy
const migration = Migration.define({ from: ContactV1, to: ContactV2, transform: async (from) => ({ name: `${from.firstName} ${from.lastName}` }), onMigration: async () => {},});
O(1) at definition time; reads both schema URIs.
Define a migration between two object schemas.