Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Datasources map[string]Datasource `json:"datasources"` MigrationsDir string `json:"migrations"` MigrationsTable string `json:"migrations_table"` }
Config for migrate module
type Datasource ¶
Datasource is parsed from the config
type Module ¶
type Module struct { Config *config.Module DB *sql.DB Logger *logger.Module // contains filtered or unexported fields }
Module migrate provides support for migrating postgres databases using rubenv/sql-migrate
func (*Module) ConnectDefault ¶
ConnectDefault to the DB with name specified by env
func (*Module) GetBackend ¶
GetBackend selects the datasource identified by dbname in the config file and initializes the correct type of backend.
func (*Module) SetBackOff ¶
func (*Module) SetMigrationSource ¶
SetMigrationSource sets the migration source, for compatibility with embedded file assets.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.