Skip to main content

compareSchemaPlans

@webda/sql-schema


Function: compareSchemaPlans()

compareSchemaPlans(live, next, options?): SchemaChange[]

Defined in: packages/sql-schema/src/compare.ts:96

Compare the plan of a new version to the plans of the versions still running on the same database

The physical schema has to stay the union of every live plan: additions are safe, anything making the rows of one version unreadable or unwritable by another (type changes, narrowing, key, hierarchy or relation changes) blocks.

Parameters​

live​

LiveSchemaPlan[]

the plans of the running versions

next​

RelationalSchemaPlan

the plan of the new version

options?​

CompareSchemaOptions = {}

the options

Returns​

SchemaChange[]

the changes, every category included