Skip to content

Commit

Permalink
Fix foreign key constraints during migration
Browse files Browse the repository at this point in the history
  • Loading branch information
vdombrovski authored and easybe committed Oct 6, 2023
1 parent 4f0820b commit 93e41b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func server(c *serverConfig) (err error) {
}
db, err := dbConnect(c, &gorm.Config{
Logger: logger.Default.LogMode(logMode),
DisableForeignKeyConstraintWhenMigrating: true,
})
sqlDB, err := db.DB()

Expand Down

0 comments on commit 93e41b9

Please sign in to comment.