Merge pull request #79 from github/noop-drop-ghost
on noop operation, drop ghost table at end
This commit is contained in:
commit
45625a6a6d
@ -1177,10 +1177,12 @@ func (this *Migrator) finalCleanup() error {
|
||||
return err
|
||||
}
|
||||
if this.migrationContext.OkToDropTable && !this.migrationContext.TestOnReplica {
|
||||
dropTableFunc := func() error {
|
||||
return this.applier.dropTable(this.migrationContext.GetOldTableName())
|
||||
if err := this.retryOperation(this.applier.DropOldTable); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := this.retryOperation(dropTableFunc); err != nil {
|
||||
}
|
||||
if this.migrationContext.Noop {
|
||||
if err := this.retryOperation(this.applier.DropGhostTable); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user