Documentation ¶
Index ¶
- func ConnectProjectDB(reconnect bool) (result bool, err error)
- func Exec(options Options) (err error)
- func ExecuteSQL(statement string, dryrun bool) (output string, err error)
- func InProgressID() (inProgressID int64, err error)
- func SetProjectDB(pdb *gorp.DbMap)
- func Setup(db *gorp.DbMap, projectDatabaseID int, projectConnDetails string)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectProjectDB ¶
ConnectProjectDB Setup the Database connection to the project database. If the reconnect parameter is true, then a reconnect will be forced. This is used when recreating the project database.
func Exec ¶
Exec Apply the migration to the project database. The parmeters can be used to just execute a dryrun, force past any validity checks, or disable using pt-online-schema-change.
func ExecuteSQL ¶
ExecuteSQL Execute SQL in the Project DB
func InProgressID ¶
InProgressID Returns the ID of a migration in the DB whose current status is InProgress. If no Migration is running 0 is returned.
func SetProjectDB ¶
SetProjectDB Used to set a configured gorp.DbMap so that Unit Tests can control project database access
Types ¶
Click to show internal directories.
Click to hide internal directories.