From 4ecd70044ca118ef62e0889ba4dc5fc40b299e1d Mon Sep 17 00:00:00 2001 From: elraphty Date: Mon, 22 Apr 2024 16:54:03 +0100 Subject: [PATCH] added conditional for user_roles --- db/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/config.go b/db/config.go index 86ea7c294..9789078b9 100644 --- a/db/config.go +++ b/db/config.go @@ -200,7 +200,9 @@ func (db database) MigrateTablesWithOrgUuid() { } } if !db.db.Migrator().HasTable("workspace_user_roles") { - db.db.AutoMigrate(&UserRoles{}) + if !db.db.Migrator().HasColumn(UserRoles{}, "workspace_uuid") { + db.db.AutoMigrate(&UserRoles{}) + } } if !db.db.Migrator().HasTable("workspaces") { db.db.AutoMigrate(&Organization{})