mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
fix: table drop in migration
This commit is contained in:
parent
915436822b
commit
7ab9c45f4f
@ -11,14 +11,10 @@ func init() {
|
|||||||
f := migrationFunc{
|
f := migrationFunc{
|
||||||
name: name,
|
name: name,
|
||||||
f: func(db *gorm.DB, cfg *config.Config) error {
|
f: func(db *gorm.DB, cfg *config.Config) error {
|
||||||
migrator := db.Migrator()
|
if err := db.Migrator().DropTable("gorp_migrations"); err != nil {
|
||||||
|
logbuch.Info("dropped table 'gorp_migrations'")
|
||||||
if !migrator.HasTable("gorp_migrations") {
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
logbuch.Info("dropping table 'gorp_migrations'")
|
|
||||||
return migrator.DropTable("gorp_migrations")
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user