Versions in this module Expand all Collapse all v1 v1.0.0 Jan 7, 2026 Changes in this version + type Config struct + DBType string + DryRun bool + MigrationsDir string + Verbose bool + type DatabaseDriver interface + ExecuteMigration func(migrationFile string, isUp bool) error + GetDBType func() string + type Manager struct + Config *Config + Driver DatabaseDriver + func NewManager(driver DatabaseDriver, config *Config) *Manager + func (m *Manager) CreateMigration(name string) error + func (m *Manager) GetAppliedMigrations() ([]*Migration, error) + func (m *Manager) GetCurrentVersion() (int64, error) + func (m *Manager) GetMigrationsDir() string + func (m *Manager) GetPendingMigrations() ([]*Migration, error) + func (m *Manager) GetStatus() ([]*Migration, error) + func (m *Manager) LoadMigrations() ([]*Migration, error) + func (m *Manager) Log(msg string, c *color.Color) + func (m *Manager) LogError(msg string) + func (m *Manager) LogInfo(msg string) + func (m *Manager) LogSuccess(msg string) + func (m *Manager) MigrateDown(targetVersion int64, count int) error + func (m *Manager) MigrateUp(targetVersion int64, count int) error + type Migration struct + Applied bool + AppliedAt *time.Time + DownFile string + Name string + UpFile string + Version int64 + type MigrationTracker interface + Close func() error + GetAppliedMigrations func() ([]int64, error) + GetCurrentVersion func() (int64, error) + Initialize func() error + MarkMigrationApplied func(version int64) error + MarkMigrationReverted func(version int64) error + type MongoDriver struct + func NewMongoDriver() (*MongoDriver, error) + func (m *MongoDriver) Close() error + func (m *MongoDriver) ExecuteMigration(migrationFile string, isUp bool) error + func (m *MongoDriver) GetAppliedMigrations() ([]int64, error) + func (m *MongoDriver) GetCurrentVersion() (int64, error) + func (m *MongoDriver) GetDBType() string + func (m *MongoDriver) Initialize() error + func (m *MongoDriver) MarkMigrationApplied(version int64) error + func (m *MongoDriver) MarkMigrationReverted(version int64) error + type PostgresDriver struct + func NewPostgresDriver() (*PostgresDriver, error) + func (p *PostgresDriver) Close() error + func (p *PostgresDriver) ExecuteMigration(migrationFile string, isUp bool) error + func (p *PostgresDriver) GetAppliedMigrations() ([]int64, error) + func (p *PostgresDriver) GetCurrentVersion() (int64, error) + func (p *PostgresDriver) GetDBType() string + func (p *PostgresDriver) Initialize() error + func (p *PostgresDriver) MarkMigrationApplied(version int64) error + func (p *PostgresDriver) MarkMigrationReverted(version int64) error + type SchemaMigration struct + AppliedAt time.Time + Version int64