1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: attempt to fix failing sqlite migrations (resolve #210)

This commit is contained in:
Ferdinand Mütsch
2021-06-13 11:43:24 +02:00
parent 25464e9519
commit 82b8951437
3 changed files with 3 additions and 2 deletions

View File

@@ -115,6 +115,7 @@ func main() {
db, err = gorm.Open(config.Db.GetDialector(), &gorm.Config{Logger: gormLogger})
if config.Db.Dialect == "sqlite3" {
db.Raw("PRAGMA foreign_keys = ON;")
db.DisableForeignKeyConstraintWhenMigrating = true
}
if config.IsDev() {