Documentation ¶
Index ¶
Constants ¶
View Source
const ( OnDbConn = "Establishing database connection" OnNewInstance = "Creating new migrate instance" OnVersionCheck = "Checking database version" OnDrop = "Dropping database" OnUpgrade = "Upgrading database" )
Those are actually not only errors, also used for logging
Variables ¶
This section is empty.
Functions ¶
func LogMigrationErr ¶
func LogMigrationErr(mErr MigrationErr, logger *slog.Logger)
func NewMigrateInstance ¶
Types ¶
type MigrationConfig ¶
type MigrationErr ¶
func DoMigrate ¶
func DoMigrate(ctx context.Context, cfg MigrationConfig) (uint, bool, MigrationErr)
func NewMigrationErr ¶
func NewMigrationErr(err string, vars map[string]any) MigrationErr
Click to show internal directories.
Click to hide internal directories.