allowing EOF result for loadJSON

This commit is contained in:
Shlomi Noach 2016-12-28 23:17:01 +02:00
parent e4874c84bd
commit e9e9d6d9da

View File

@ -280,7 +280,7 @@ func (this *Migrator) readResurrectedContext() error {
// Loading migration context to a temporary location: // Loading migration context to a temporary location:
this.resurrectedContext = base.NewMigrationContext() this.resurrectedContext = base.NewMigrationContext()
if err := this.resurrectedContext.LoadJSON(encodedContext); err != nil { if err := this.resurrectedContext.LoadJSON(encodedContext); err != nil && err != io.EOF {
return err return err
} }
// Sanity: heuristically verify loaded context truly reflects our very own context (e.g. is this the same migration on the same table?) // Sanity: heuristically verify loaded context truly reflects our very own context (e.g. is this the same migration on the same table?)