db

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const TableName = "data_migrations"

Variables

Functions

This section is empty.

Types

type Migration

type Migration interface {
	Name() string // 迁移的名字,必须是唯一的
	Up() error    // 执行迁移
	Down() error  // 回滚迁移
}

func CreateDataMigrations

func CreateDataMigrations() []Migration

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

func NewMigrator

func NewMigrator(migrations []Migration, svc *svc.ServiceContext) *Migrator

func (*Migrator) Migrate

func (m *Migrator) Migrate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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