migration

package
v0.0.0-...-cb929b8 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migration

type Migration struct {
	gorm.Model
	Name string
}

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

func New

func New(migrationsTable string, migrations []Stage, log zerolog.Logger) *Migrator

func (*Migrator) Migrate

func (m *Migrator) Migrate(db *gorm.DB) error

type Stage

type Stage struct {
	Name     string
	Function func(db *gorm.DB, name string) error
}

Jump to

Keyboard shortcuts

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