migrate

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CreateAdminUser

func CreateAdminUser(email, password string, tx *gorm.DB) error

CreateAdminUser create admin user

func ExecuteSQLFile

func ExecuteSQLFile(tx *gorm.DB, path string) error

ExecuteSQLFile 执行嵌入的 SQL 文件,去除注释

func Migrate

func Migrate(driver, dsn string) *migrate.Migrate

func Up added in v1.19.0

func Up(driver, dsn string) error

Up applies every pending migration and always releases the source and database drivers opened by golang-migrate. Callers previously invoked Migrate(...).Up() directly and leaked the migration driver's independent database connection after startup or installation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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