From 33ea3dd53dee4361a7f818c7dcfcda0888fcb93b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20D=C3=B6ll?= Date: Mon, 17 Jun 2024 19:37:54 +0000 Subject: [PATCH] fix: table prefix for team users --- adapters/adapter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adapters/adapter.go b/adapters/adapter.go index ef8969a..f255290 100644 --- a/adapters/adapter.go +++ b/adapters/adapter.go @@ -89,7 +89,7 @@ type GothUser struct { // Sessions are the sessions of the user. Sessions []GothSession `json:"sessions" gorm:"foreignKey:UserID;constraint:OnDelete:CASCADE"` // Teams are the teams the user is a member of. - Teams *[]GothTeam `json:"teams" gorm:"many2many:team_users"` + Teams *[]GothTeam `json:"teams" gorm:"many2many:goth_team_users"` // CreatedAt is the creation time of the user. CreatedAt time.Time `json:"created_at"` // UpdatedAt is the update time of the user. @@ -150,7 +150,7 @@ type GothTeam struct { // Description is the description of the team. Description string `json:"description" validate:"max=255"` // Users are the users in the team. - Users []GothUser `json:"users" gorm:"many2many:team_users"` + Users []GothUser `json:"users" gorm:"many2many:goth_team_users"` // Roles are the roles in the team. Roles []GothRole `json:"roles" gorm:"foreignKey:TeamID;constraint:OnDelete:CASCADE"` // CreatedAt is the creation time of the team.