Skip to main content

Function: defineMigration()

defineMigration<T, S>(models, migration): T & S

Defined in: defineMigration.ts:344

Lower-level alternative to the nextSchema/defineSchemaUpdate chain: apply a migration callback and return only the merged models, dropping the per-field upgrade and deprecation metadata.

Type Parameters​

T​

T extends ModelDefs

S​

S extends ModelDefs

Parameters​

models​

T

migration​

(schema) => S

Returns​

T & S

Deprecated​

Use the nextSchema/defineSchemaUpdate chain to build versioned schemas. This function will be removed in a future version.