Module

data.schema.diff

Schema diff — compare two SchemaSnapshots and produce Operations.

Functions

diff_schemas 2 list[Operation]
Compare current and desired schemas, returning operations to migrate. Operatio…
def diff_schemas(current: SchemaSnapshot, desired: SchemaSnapshot) -> list[Operation]

Compare current and desired schemas, returning operations to migrate.

Operations are ordered: drops first, then creates, then alters.

Parameters
Name Type Description
current SchemaSnapshot
desired SchemaSnapshot
Returns
list[Operation]