migrate

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: Apache-2.0 Imports: 8 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 {
	ID        uint64 `gorm:"primaryKey;autoIncrement;"`
	Migration string `gorm:"type:varchar(255);not null;unique;"`
	Batch     int
}

type Migrator

type Migrator struct {
	Folder   string
	DB       *gorm.DB
	Migrator gorm.Migrator
}

func NewMigrator

func NewMigrator(folder string) *Migrator

func (*Migrator) Fresh

func (migrator *Migrator) Fresh()

func (*Migrator) Refresh

func (migrator *Migrator) Refresh()

func (*Migrator) Reset

func (migrator *Migrator) Reset()

func (*Migrator) Rollback

func (migrator *Migrator) Rollback()

func (*Migrator) Up

func (migrator *Migrator) Up()

Jump to

Keyboard shortcuts

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