Move table drop

This commit is contained in:
qwerty287 2024-08-19 08:11:30 +02:00
parent 614d6f06bc
commit dfe30fe6a4
No known key found for this signature in database
1 changed files with 5 additions and 5 deletions

View File

@ -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
}