Documentation
¶
Overview ¶
Package migrations provides database migration support for Romancy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DriverType ¶
type DriverType string
DriverType represents the database driver type.
const ( // DriverSQLite represents SQLite database. DriverSQLite DriverType = "sqlite" // DriverPostgres represents PostgreSQL database. DriverPostgres DriverType = "postgres" // DriverMySQL represents MySQL database. DriverMySQL DriverType = "mysql" )
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator handles database migrations.
func NewMigrator ¶
func NewMigrator(db *sql.DB, driverType DriverType) *Migrator
NewMigrator creates a new Migrator instance.
func (*Migrator) Force ¶
Force sets the migration version without running migrations. Use with caution - this is primarily for handling existing databases.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mysql provides embedded MySQL migrations.
|
Package mysql provides embedded MySQL migrations. |
|
Package postgres provides embedded PostgreSQL migrations.
|
Package postgres provides embedded PostgreSQL migrations. |
|
Package sqlite provides embedded SQLite migrations.
|
Package sqlite provides embedded SQLite migrations. |
Click to show internal directories.
Click to hide internal directories.