Commit 5d7cd2e9 by Emil Tullstedt Committed by GitHub

Teams: Add index for permission check (#25736)

* Teams: Add indices for permission check

* Teams: Remove user_id index
parent 504b7861
......@@ -37,6 +37,7 @@ func addTeamMigrations(mg *Migrator) {
Indices: []*Index{
{Cols: []string{"org_id"}},
{Cols: []string{"org_id", "team_id", "user_id"}, Type: UniqueIndex},
{Cols: []string{"team_id"}},
},
}
......@@ -45,6 +46,7 @@ func addTeamMigrations(mg *Migrator) {
//------- indexes ------------------
mg.AddMigration("add index team_member.org_id", NewAddIndexMigration(teamMemberV1, teamMemberV1.Indices[0]))
mg.AddMigration("add unique index team_member_org_id_team_id_user_id", NewAddIndexMigration(teamMemberV1, teamMemberV1.Indices[1]))
mg.AddMigration("add index team_member.team_id", NewAddIndexMigration(teamMemberV1, teamMemberV1.Indices[2]))
// add column email
mg.AddMigration("Add column email to team table", NewAddColumnMigration(teamV1, &Column{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment