boltmigration

package module
v0.0.0-...-69d38bc Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(name string, up UpFunc)

Add adds mig to queue Use this function in init()

func Apply

func Apply() error

Apply func applies migrations

func NewMigrationNames

func NewMigrationNames() ([]string, error)

NewMigrationNames returns names of new migrations

func SetDatabase

func SetDatabase(database *bbolt.DB)

SetDatabase sets a database that we should use for applying migrations

Types

type AppliedFunc

type AppliedFunc func(db *bbolt.DB) ([]string, error)

AppliedFunc returns list of applied migrations

type MarkAppliedFunc

type MarkAppliedFunc func(db *bbolt.DB, name string) error

MarkAppliedFunc marks migration as applied

type UpFunc

type UpFunc func(db *bbolt.DB) error

UpFunc applies migrations

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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