migration

package
v0.0.0-...-91b1530 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: CC0-1.0 Imports: 5 Imported by: 0

Documentation

Overview

https://github.com/go-gormigrate/gormigrate gopkg.in/gormigrate.v2

Index

Constants

This section is empty.

Variables

View Source
var (
	GormigrateOptions = &gormigrate.Options{
		TableName:                 migrationTableName,
		IDColumnName:              "id",
		IDColumnSize:              128,
		UseTransaction:            false,
		ValidateUnknownMigrations: true,
	}

	// All tables in the latest schema
	AllTables = []interface{}{
		&domain.User{},
		&domain.Article{},
		&domain.ArticleGameContent{},
		&domain.ArticleOwner{},
		&domain.ArticleTag{},
		&domain.ArticleComment{},
		&domain.ArticleImageURL{},
	}
)

Functions

func DropAllTables

func DropAllTables(db *gorm.DB) error

func GetVersions

func GetVersions() []string

func Migrate

func Migrate(db *gorm.DB) (inited bool, err error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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