diff --git a/models/migrations/v1_23/v304.go b/models/migrations/v1_23/v304.go index 0297f20f86..cede913192 100644 --- a/models/migrations/v1_23/v304.go +++ b/models/migrations/v1_23/v304.go @@ -293,11 +293,6 @@ Please try upgrading to a lower version first (suggested v1.6.4), then upgrade t return nil } - // Remove old version table - if err := x.DropTables(new(Version)); err != nil { - return err - } - // add migrations that already have been run for _, i := range oldMigrationNames[:v-minDBVersion] { if _, err := x.Insert(&xormigrate.Migration{ID: i}); err != nil { @@ -305,5 +300,10 @@ Please try upgrading to a lower version first (suggested v1.6.4), then upgrade t } } + // Remove old version table + if err := x.DropTables(new(Version)); err != nil { + return err + } + return nil }