Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DomainDiffResult ¶ added in v0.12.0
func DiffDomains ¶ added in v0.12.0
func DiffDomains(current, desired *orderedmap.Map[string, *model.Domain], dc DropChecker) (*DomainDiffResult, error)
type DropChecker ¶ added in v0.14.0
DropChecker checks whether dropping a specific object type is allowed.
type EnumDiffResult ¶ added in v0.9.0
func DiffEnums ¶ added in v0.9.0
func DiffEnums(current, desired *orderedmap.Map[string, *model.Enum], dc DropChecker) (*EnumDiffResult, error)
type TableDiffResult ¶ added in v0.16.0
type TableDiffResult struct {
FKDropStmts []string // FK drops (should run first)
Stmts []string // CREATE/ALTER TABLE, columns, constraints, indexes, comments
FKAddStmts []string // FK adds and renames (should run last)
DropStmts []string // DROP TABLE (separate from Stmts for ordering)
DisallowedDropStmts []string // DROP TABLE / DROP COLUMN / DROP CONSTRAINT (incl. FK) / DROP INDEX suppressed by DropChecker, with "-- skipped: " prefix
HasConcurrently bool // true if any index operation uses CONCURRENTLY
}
TableDiffResult separates FK operations from other statements to allow correct ordering: FK drops first, then schema changes, then FK adds last.
func DiffTables ¶
func DiffTables(current, desired *orderedmap.Map[string, *model.Table], dc DropChecker) (*TableDiffResult, error)
type ViewDiffResult ¶ added in v0.18.0
type ViewDiffResult struct {
DropStmts []string // DROP VIEW / DROP MATERIALIZED VIEW (should run before table changes)
CreateStmts []string // ALTER VIEW RENAME, CREATE OR REPLACE VIEW, CREATE MATERIALIZED VIEW, indexes, comments (should run after table changes)
DisallowedDropStmts []string // DROP VIEW / DROP MATERIALIZED VIEW / DROP INDEX (on matview) suppressed by DropChecker, with "-- skipped: " prefix
HasConcurrently bool // true if any index operation uses CONCURRENTLY
}
ViewDiffResult separates view DROP and CREATE/MODIFY statements. Drops should run before table changes, creates after.
func DiffViews ¶
func DiffViews(current, desired *orderedmap.Map[string, *model.View], dc DropChecker) (*ViewDiffResult, error)
Click to show internal directories.
Click to hide internal directories.