Documentation
¶
Index ¶
- type Differ
- type Inspector
- type Migrator
- func (m *Migrator) Diff(current, desired *migrate.SchemaState) ([]migrate.Change, error)
- func (m *Migrator) InspectRealm(ctx context.Context) (*migrate.SchemaState, error)
- func (m *Migrator) InspectSchema(ctx context.Context, name string) (*migrate.Schema, error)
- func (m *Migrator) Lock(ctx context.Context, name string, timeout time.Duration) (func() error, error)
- func (m *Migrator) Plan(ctx context.Context, name string, changes []migrate.Change) (*migrate.Plan, error)
- type Planner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Differ ¶
type Differ struct{}
Differ compares two SchemaState values and returns the changes needed to transition from current to desired.
type Inspector ¶
type Inspector struct {
// contains filtered or unexported fields
}
Inspector inspects a PostgreSQL database via system catalogs.
func NewInspector ¶
NewInspector creates a new Inspector backed by the given connection pool.
func (*Inspector) InspectRealm ¶
InspectRealm inspects all user-created schemas in the database.
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is the full PostgreSQL migration engine.
func NewMigrator ¶
NewMigrator creates a new PostgreSQL Migrator.
func (*Migrator) InspectRealm ¶
InspectRealm delegates to Inspector.
func (*Migrator) InspectSchema ¶
InspectSchema delegates to Inspector.
Click to show internal directories.
Click to hide internal directories.