Documentation
¶
Index ¶
Constants ¶
View Source
const IndexBTree = schema.IndexBTree
IndexBTree for comparison (re-exported from schema for convenience here).
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Change ¶
type Change struct {
Type ChangeType
Schema string // PG schema name
ObjectName string // table, view, function, etc.
Detail string // human-readable description
SQL string // the DDL statement
Destructive bool // true for drops
}
Change represents a single schema change.
type ChangeType ¶
type ChangeType int
ChangeType classifies a schema change.
const ( CreateSchema ChangeType = iota DropSchema CreateExtension DropExtension CreateEnum AlterEnum // add values DropEnum CreateSequence AlterSequence DropSequence CreateTable DropTable AddColumn DropColumn AlterColumn AddConstraint // PK, unique, check DropConstraint AddForeignKey DropForeignKey CreateIndex DropIndex CreateView DropView CreateMaterializedView DropMaterializedView CreateFunction DropFunction CreateTrigger DropTrigger SetComment DropComment )
type Plan ¶
Plan is an ordered list of changes with state hashes.
func Diff ¶
Diff compares the current database state against the desired state and returns an ordered list of changes needed to reach the desired state.
func (*Plan) HasDestructive ¶
HasDestructive returns true if any change is destructive.
Click to show internal directories.
Click to hide internal directories.