migration

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const VersionKey = ".migration.version"

VersionKey is the setting containing the migration version.

Variables

View Source
var MinimumVersion = 1

MinimumVersion is the index of the earliest version that we can migrate from.

View Source
var Settings = &settings.Settings

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
	Models() []interface{}
}

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
v10
v11
v12
v2
v3
v4
v5
v6
v7
v8
v9

Jump to

Keyboard shortcuts

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