Documentation / @zerotal/orm / index / SchemaDiffer
Variable: SchemaDiffer
constSchemaDiffer:object
Defined in: packages/orm/src/schema/SchemaDiffer.ts:40
Compares a set of model schemas against the live database and returns the deltas: tables that need to be created and columns that need to be added.
Additive deltas (newTables, newColumns) are always safe to apply. Dropped columns are reported separately and only applied by a disruptive synchronize.
Type Declaration
diff()
diff(
schemas):Promise<DiffResult>
Parameters
schemas
Returns
Promise<DiffResult>
isEmpty()
isEmpty(
diff):boolean
True when there is nothing additive to generate. Dropped columns are
deliberately excluded: migrate:generate never emits drops, so a table with
only dropped columns is still "in sync" from the generator's perspective.
Parameters
diff
Returns
boolean