migration

package
v0.5.0-rc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCallWithNewTransaction = errors.New("call with new transaction")

Functions

func MigrateIfNeeded

func MigrateIfNeeded(targetDB db.DB) error

func SchemaVersion

func SchemaVersion(targetDB db.DB) (uint64, error)

Types

type Migration added in v0.5.0

type Migration interface {
	Before()
	Migrate(db.Transaction) error
}

type MigrationFunc added in v0.5.0

type MigrationFunc func(db.Transaction) error

func (MigrationFunc) Before added in v0.5.0

func (f MigrationFunc) Before()

Before is a no-op.

func (MigrationFunc) Migrate added in v0.5.0

func (f MigrationFunc) Migrate(txn db.Transaction) error

Migrate returns f(txn).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL