Restore command #593

Merged
konrad merged 8 commits from feature/restore into master 2020-06-21 15:30:51 +00:00
1 changed files with 9 additions and 0 deletions
Showing only changes of commit 29efc3df4c - Show all commits

View File

@ -104,6 +104,15 @@ func Rollback(migrationID string) {
log.Info("Rolled back successfully.")
}
// MigrateTo executes all migrations up to a certain point
func MigrateTo(migrationID string, x *xorm.Engine) error {
m := initMigration(x)
if err := m.MigrateTo(migrationID); err != nil {
return err
}
return nil
}
// Deletes a column from a table. All arguments are strings, to let them be standalone and not depending on any struct.
func dropTableColum(x *xorm.Engine, tableName, col string) error {