Documentation / @zerotal/orm / index / synchronizeSchema
Function: synchronizeSchema()
synchronizeSchema(
options?):Promise<DiffResult>
Defined in: packages/orm/src/schema/autoMigrate.ts:56
Schema sync (TypeORM-style synchronize): create missing tables and add missing columns
to match the registered models. By default it is additive only and never drops or alters
existing columns.
Pass { disruptive: true } to also drop columns that no model declares anymore - an
explicit opt-in, since dropping a column destroys its data.
Returns the diff that was applied (additive deltas are empty when already in sync;
droppedColumns is populated but only acted on when disruptive is set).
Parameters
options?
SynchronizeOptions = {}
Returns
Promise<DiffResult>