diff --git a/db/config.go b/db/config.go index b756f48c5..a466932b0 100644 --- a/db/config.go +++ b/db/config.go @@ -67,13 +67,15 @@ func InitDB() { db.AutoMigrate(&ConnectionCodes{}) db.AutoMigrate(&Bounty{}) db.AutoMigrate(&BountyRoles{}) - db.AutoMigrate(&UserRoles{}) db.AutoMigrate(&BountyBudget{}) db.AutoMigrate(&BudgetHistory{}) db.AutoMigrate(&PaymentHistory{}) db.AutoMigrate(&InvoiceList{}) db.AutoMigrate(&UserInvoiceData{}) + if !db.Migrator().HasTable("workspace_user_roles") { + db.AutoMigrate(&UserRoles{}) + } if !db.Migrator().HasTable("workspaces") { db.AutoMigrate(&Organization{}) }