Documentation ¶
Index ¶
- Constants
- Variables
- func CheckIfDbIsInitialised() bool
- func GetDbConnectionsMissing() []string
- func GetMigrationAppCollectionExists() bool
- func GetMigrationAppDatabaseExists() bool
- func GetMigrationFileTemplate() string
- func GetMigrationsPendingCount() int
- func GetMigrationsProcessedCount() int
- func GetMigrationsRegisteredCount() int
- func InitialiseDatabase()
- func MigrationEngineInitialise(databaseName string, collectionName string, dbClient *mongo.Client, ...)
- func RegisterDbConnection(label string, description string, dbClient *mongo.Client)
- func RegisterMigration(sequence int64, description string, dbConnLabel string, ...)
- func RollbackASpecificMigration(migrationUniqueId string) error
- func RollbackLastBatchMigrations() error
- func RollbackSingleLastMigration() error
- func RollbackToSpecificMigration(migrationUniqueId string) error
- func RunNextSingleMigration() error
- func RunPendingMigrations() error
- func RunSpecificMigration(migrationUniqueId string) error
- func RunUpToSpecificMigration(migrationUniqueId string) error
- type DatabaseConnectionLabelType
- type MigrationsProcessedType
- type MigrationsRegisteredType
Constants ¶
View Source
const DbConnectionLabelDefault = "*DEFAULT*"
View Source
const MigrationAppDefaultCollection = "migrations"
View Source
const MigrationAppDefaultDatabase = "migrations"
View Source
const SequenceStrictnessNoDuplicates = "NODUPLICATES" //Sequence ids cannot be used more than once, they are unique (like all of us....)
View Source
const SequenceStrictnessNoLateComers = "NOLATECOMERS" //The system won't allow processing a sequence smaller then a sequence already processed
Variables ¶
View Source
var Verbose bool = true
Functions ¶
func CheckIfDbIsInitialised ¶
func CheckIfDbIsInitialised() bool
func GetDbConnectionsMissing ¶
func GetDbConnectionsMissing() []string
func GetMigrationAppCollectionExists ¶
func GetMigrationAppCollectionExists() bool
func GetMigrationAppDatabaseExists ¶
func GetMigrationAppDatabaseExists() bool
func GetMigrationFileTemplate ¶
func GetMigrationFileTemplate() string
func GetMigrationsPendingCount ¶
func GetMigrationsPendingCount() int
func GetMigrationsProcessedCount ¶
func GetMigrationsProcessedCount() int
func GetMigrationsRegisteredCount ¶
func GetMigrationsRegisteredCount() int
func InitialiseDatabase ¶
func InitialiseDatabase()
func RegisterDbConnection ¶
func RegisterMigration ¶
func RollbackLastBatchMigrations ¶
func RollbackLastBatchMigrations() error
func RollbackSingleLastMigration ¶
func RollbackSingleLastMigration() error
func RunNextSingleMigration ¶
func RunNextSingleMigration() error
func RunPendingMigrations ¶
func RunPendingMigrations() error
func RunSpecificMigration ¶
Types ¶
type DatabaseConnectionLabelType ¶
type DatabaseConnectionLabelType struct { Label string Description string // contains filtered or unexported fields }
func GetConnectionsLabels ¶
func GetConnectionsLabels() []DatabaseConnectionLabelType
type MigrationsProcessedType ¶
type MigrationsProcessedType []migrationDbRecordType
func GetMigrationsProcessed ¶
func GetMigrationsProcessed() MigrationsProcessedType
type MigrationsRegisteredType ¶
type MigrationsRegisteredType []migrationRegisteredType
func GetMigrationsPending ¶
func GetMigrationsPending() MigrationsRegisteredType
func GetMigrationsRegistered ¶
func GetMigrationsRegistered() MigrationsRegisteredType
Click to show internal directories.
Click to hide internal directories.