migrator

package
v0.0.87 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Db *gorm.DB

Functions

func AddVersion

func AddVersion(db *gorm.DB, version string) error

func VersionExists

func VersionExists(currentVersions []Migration, version string) bool

Types

type Migration

type Migration struct {
	gorm.Model
	Version    string     `json:"version"`
	ExecutedAt *time.Time `json:"executed_at"`
}

func GetVersions

func GetVersions(db *gorm.DB) ([]Migration, error)

func MigrateUp

func MigrateUp(db *gorm.DB) []Migration

Jump to

Keyboard shortcuts

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