Versions in this module Expand all Collapse all v0 v0.1.0 Aug 19, 2026 Changes in this version + var ErrDifferentTables = errors.New("models describe different tables") + var ErrNotTable = errors.New("not an ordinary or partitioned table") + var ErrTableNotFound = errors.New("table not found") + var ErrUnsupportedChange = errors.New("unsupported schema change") + type Change struct + Destructive bool + Kind ChangeKind + SQL string + func Diff(schema string, live, desired Model) ([]Change, error) + type ChangeKind string + const ChangeAddColumn + const ChangeAddConstraint + const ChangeAlterType + const ChangeCreateIndex + const ChangeCreateTable + const ChangeDropColumn + const ChangeDropConstraint + const ChangeDropDefault + const ChangeDropIndex + const ChangeDropNotNull + const ChangeSetDefault + const ChangeSetNotNull + func ChangeKinds() []ChangeKind + type Column struct + Default string + Generated bool + Identity Identity + Name string + NotNull bool + SequenceDefault bool + Type string + type Constraint struct + Def string + Name string + type Identity string + const IdentityAlways + const IdentityByDefault + const IdentityNone + type Index struct + Def string + Name string + type Model struct + Columns []Column + Constraints []Constraint + Indexes []Index + Table string + func Introspect(ctx context.Context, db *pgxpool.Pool, schema, table string) (Model, error) + func IntrospectDesired(ctx context.Context, db *pgxpool.Pool, desired statement.DesiredSchema) (Model, error)