migration

package
v0.0.0-...-e0c2b11 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONCommand

type JSONCommand struct {
	UpCommand   bson.M `bson:"up"`
	DownCommand bson.M `bson:"down"`
}

type MongoMigration

type MongoMigration struct {
	Source string
	Driver driver.Driver

	HistoryCollection history.MigrationHistory
}

func (*MongoMigration) Run

func (mm *MongoMigration) Run(ctx context.Context, directionValue int, stepsValue int) error

func (*MongoMigration) RunSpecificFile

func (mm *MongoMigration) RunSpecificFile(ctx context.Context, migrationFileName string, directionValue int) (interface{}, error)

func (*MongoMigration) StartMigration

func (mm *MongoMigration) StartMigration(ctx context.Context, source string, client *mongo.Client, cfg config.DatabaseConfig, historyCollection history.MigrationHistory) error

func (*MongoMigration) StartMigrationWithDriver

func (mm *MongoMigration) StartMigrationWithDriver(ctx context.Context, source string, driver driver.Driver, historyCollection history.MigrationHistory) error

Jump to

Keyboard shortcuts

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