migratelib

package
v1.1.97 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(name string, dst schema.Tabler)

Add 新增一个迁移文件,所有的迁移文件都需要调用此方法来注册

func InitDBName added in v1.1.25

func InitDBName(dbName string)

InitDBName 初始化dbName

func UpAlways added in v1.1.40

func UpAlways()

UpAlways 每次启动执行

Types

type MigrationFile

type MigrationFile struct {
	FileName string
	Target   schema.Tabler
}

MigrationFile 代表着单个迁移文件

type PrimaryKey added in v1.1.76

type PrimaryKey struct {
	I uint64 `gorm:"->:false;<-:create;column:i;primaryKey;autoIncrement;comment:业务无关主键" json:"-" pb:"-"`
}

PrimaryKey 业务无关自增主键

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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