store

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 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 MigrationsStore

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

MigrationsStore is store for migrations

func NewStore

func NewStore(db dBContract, tableName string) *MigrationsStore

NewStore return new instance

func (*MigrationsStore) ApplyMigrationsDown

func (s *MigrationsStore) ApplyMigrationsDown(migrations []*entity.MigrationEntity) error

ApplyMigrationsDown roll back latest migrations

func (*MigrationsStore) ApplyMigrationsUp

func (s *MigrationsStore) ApplyMigrationsUp(migrations []*entity.MigrationEntity) error

ApplyMigrationsUp rolls out migrations

func (*MigrationsStore) CreateMigrationsTable

func (s *MigrationsStore) CreateMigrationsTable(query string) error

CreateMigrationsTable creates empty table for storing migrations

func (*MigrationsStore) GetLatestVersionNumber

func (s *MigrationsStore) GetLatestVersionNumber() (uint, error)

GetLatestVersionNumber returns latest version number from migrations

func (*MigrationsStore) GetMigrations

func (s *MigrationsStore) GetMigrations() ([]*entity.MigrationEntity, error)

GetMigrations returns all migrations from db

func (*MigrationsStore) GetMigrationsByVersion

func (s *MigrationsStore) GetMigrationsByVersion(version uint) ([]*entity.MigrationEntity, error)

GetMigrationsByVersion returns migrations by version number from db

Jump to

Keyboard shortcuts

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