migrations

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Migrations []Migration = make([]Migration, 0)

Functions

func AddMigration

func AddMigration(migration Migration)

func RevertLastMigration

func RevertLastMigration() error

func RevertMigrations

func RevertMigrations() error

func RunMigrations

func RunMigrations() error

Types

type BaseMigration

type BaseMigration struct {
	Name string
	Up   string
	Down string
}

func (BaseMigration) Revert

func (migration BaseMigration) Revert() error

func (BaseMigration) Run

func (migration BaseMigration) Run() error

type Migration

type Migration interface {
	Run() error
	Revert() error
}

Jump to

Keyboard shortcuts

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