migration

package
v0.14.6 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context) errors.Error

func Init

func Init(db *gorm.DB)

func NeedConfirmation added in v0.12.0

func NeedConfirmation() bool

func Register

func Register(scripts []Script, comment string)

Types

type MigrationHistory

type MigrationHistory struct {
	CreatedAt     time.Time
	ScriptVersion uint64 `gorm:"primarykey"`
	ScriptName    string `gorm:"primarykey;type:varchar(255)"`
	Comment       string
}

func (MigrationHistory) TableName

func (MigrationHistory) TableName() string

type Script

type Script interface {
	Up(ctx context.Context, db *gorm.DB) errors.Error
	Version() uint64
	Name() string
}

Jump to

Keyboard shortcuts

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