migrate

package
v0.0.0-...-367fef7 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Name is the name of the compiled software.
	Name string
	// Version is the version of the compiled software.
	Version string

	Db *gorm.DB
)

go build -ldflags "-X main.Version=x.y.z"

Functions

func CommitOrRollback

func CommitOrRollback(tx *gorm.DB, err error)

func Connect

func Connect()

func DeleteRowByTable

func DeleteRowByTable(tableName string, field string, value interface{})

DeleteRowByTable WANING: 该操作会删除数据,并且不可恢复 通常只用于测试中

func Migrate

func Migrate(conf string, db *gorm.DB) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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