Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MigrateOptions ¶
type MigrateOptions struct { // MaxSteps is the maximum number of migrations to apply either up or down. // Leave nil or set -1 for an unlimited number. MaxSteps *int }
MigrateOptions are options for a migrate operation.
type MigrateResult ¶
type MigrateResult struct { // Versions are migration versions that were added (for up migrations) or // removed (for down migrations) for this run. Versions []int64 }
MigrateResult is the result of a migrate operation.
type Migrator ¶
type Migrator struct { baseservice.BaseService // contains filtered or unexported fields }
Migrator is a database migration tool for River which can run up or down migrations in order to establish the schema that the queue needs to run.
func NewMigrator ¶
func NewMigrator(archetype *baseservice.Archetype) *Migrator
func (*Migrator) Down ¶
func (m *Migrator) Down(ctx context.Context, txBeginner dbutil.TxBeginner, opts *MigrateOptions) (*MigrateResult, error)
Down runs down migrations.
func (*Migrator) Up ¶
func (m *Migrator) Up(ctx context.Context, txBeginner dbutil.TxBeginner, opts *MigrateOptions) (*MigrateResult, error)
Up runs up migrations.
Click to show internal directories.
Click to hide internal directories.