migration

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: MIT Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoDownMigrations

func DoDownMigrations() error

DoDownMigrations - Start the rollbacks

func DoUpMigrations

func DoUpMigrations() error

DoUpMigrations - Start the migrations

func InitMigrationsList

func InitMigrationsList(ml []Migrable)

InitMigrationsList - Sets the migrations list

Types

type Migrable

type Migrable interface {
	Down() string
	GetMigrationName() string
	Up() string
}

Migrable - Defines the generic interface to manage a migration

type Migrator

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

Migrator - Manages the migration

func GetMigratorInstance

func GetMigratorInstance() *Migrator

GetMigratorInstance - Returns the Migrator's instance GetMigratorInstance - Restituisce l'unica istanza di migrator

func (*Migrator) DoDownMigrations

func (m *Migrator) DoDownMigrations() error

DoDownMigrations - Executes the rollbacks defined in the migrations list

func (*Migrator) DoUpMigrations

func (m *Migrator) DoUpMigrations() error

DoUpMigrations - Executes the migrations

Jump to

Keyboard shortcuts

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