Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultTableName = "bingo_migration"
Default table name for migration records
Variables ¶
This section is empty.
Functions ¶
func SetTableName ¶ added in v1.5.3
func SetTableName(name string)
SetTableName sets the migration table name
Types ¶
type Migration ¶
type MigrationFile ¶
type MigrationFile struct {
Up migrationFunc
Down migrationFunc
FileName string
}
func GetMigrationFile ¶
func GetMigrationFile(name string) MigrationFile
type Migrator ¶
func NewMigrator ¶
NewMigrator creates a new Migrator with default table name.
func NewMigratorWithTable ¶ added in v1.5.2
NewMigratorWithTable creates a new Migrator with custom table name. If tableName is empty, uses the value from environment variable or default.
func (*Migrator) DeleteAllTables ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
ABOUTME: Calculates checksum of migration files for cache invalidation ABOUTME: Uses SHA256 hash of all .go files in migration directory
|
ABOUTME: Calculates checksum of migration files for cache invalidation ABOUTME: Uses SHA256 hash of all .go files in migration directory |
Click to show internal directories.
Click to hide internal directories.