Documentation ¶
Index ¶
- Variables
- func Migrate()
- type DataStore
- func (datastore *DataStore) Connect() (err error)
- func (datastore *DataStore) InitMigrationsTable()
- func (datastore *DataStore) Migrate()
- func (datastore *DataStore) MigrateByType(migrationsDir string, migrationFile string, migrationType string)
- func (datastore *DataStore) Ping() (err error)
- func (datastore *DataStore) RunSql(sql string) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MigrationSQLDefault = map[string]string{ "init": "CREATE TABLE IF NOT EXISTS migrations (uuid VARCHAR PRIMARY KEY) ;", "up": "INSERT INTO migrations (uuid) VALUES ('%s') ;", "down": "DELETE FROM migrations WHERE uuid = '%s' ;", } MigrationSQL = map[string]map[string]string{ "postgresql": MigrationSQLDefault, "postgres": MigrationSQLDefault, } )
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.