Documentation
¶
Overview ¶
Package migrate applies readable PostgreSQL migrations through Soro transactions.
Index ¶
- type Group
- type Migration
- type Migrator
- type Plan
- func (plan *Plan) Apply(ctx context.Context, migrator *Migrator) error
- func (plan *Plan) Groups() []Group
- func (plan *Plan) Migrations() []Migration
- func (plan *Plan) Rollback(ctx context.Context, migrator *Migrator, count int) error
- func (plan *Plan) Status(ctx context.Context, migrator *Migrator) ([]Status, error)
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Migration ¶
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
type Plan ¶
type Plan struct {
// contains filtered or unexported fields
}
Plan is an immutable set of migration groups. Groups retain their declared order while migrations within a group retain lexical local order.
func NewPlan ¶
NewPlan validates and copies migration groups. The returned plan does not retain any caller-owned slices.
func (*Plan) Migrations ¶
Migrations returns a deep-copied flattened declaration in group order.
Click to show internal directories.
Click to hide internal directories.