migration

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const VersionKey = ".migration.version"

VersionKey is the setting containing the migration version.

Variables

This section is empty.

Functions

func Migrate

func Migrate(migrations []Migration) (err error)

Migrate the hub by applying all necessary Migrations.

Types

type Migration

type Migration interface {
	Apply(*gorm.DB) error
	Name() string
}

Migration encapsulates the functionality necessary to perform a migration.

func All

func All() []Migration

All migrations in order.

type Version

type Version struct {
	Version int `json:"version"`
}

Version represents the value of the .migration.version setting.

Directories

Path Synopsis
v1
v2
v3

Jump to

Keyboard shortcuts

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