Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureUpToDate added in v1.11.5

func EnsureUpToDate(ctx context.Context, x *xorm.Engine) error

EnsureUpToDate will check if the db is at the correct version

func ExpectedDBVersion added in v1.23.0

func ExpectedDBVersion() int64

ExpectedDBVersion returns the expected db version

func GetCurrentDBVersion added in v1.11.5

func GetCurrentDBVersion(x *xorm.Engine) (int64, error)

GetCurrentDBVersion returns the current db version

func Migrate

func Migrate(x *xorm.Engine) error

Migrate database to current version

Types

type Version

type Version struct {
	ID      int64 `xorm:"pk autoincr"`
	Version int64 // DB version is "the last migration's idNumber" + 1
}

Version describes the version table. Should have only one row with id==1

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