Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMigration ¶
func RegisterMigration(migration *Migration)
func ResetMigrations ¶
func ResetMigrations()
Types ¶
type Migration ¶
type Migration struct {
Version string
Name string
CreatedAt time.Time
Up func(*gorm.DB) error
Down func(*gorm.DB) error
}
func GetRegisteredMigrations ¶
func GetRegisteredMigrations() []*Migration
type MigrationRecord ¶
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
func NewMigrator ¶
func (*Migrator) GetAppliedVersions ¶
type ModelRegistry ¶
type ModelRegistry interface {
GetModels() map[string]interface{}
}
ModelRegistry - users must implement this
var GlobalModelRegistry ModelRegistry
Global registry - users set this in their main.go
Click to show internal directories.
Click to hide internal directories.