mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 01:16:31 -06:00
Teams: Add index for permission check (#25736)
* Teams: Add indices for permission check * Teams: Remove user_id index
This commit is contained in:
parent
504b786141
commit
5d7cd2e9fc
@ -37,6 +37,7 @@ func addTeamMigrations(mg *Migrator) {
|
|||||||
Indices: []*Index{
|
Indices: []*Index{
|
||||||
{Cols: []string{"org_id"}},
|
{Cols: []string{"org_id"}},
|
||||||
{Cols: []string{"org_id", "team_id", "user_id"}, Type: UniqueIndex},
|
{Cols: []string{"org_id", "team_id", "user_id"}, Type: UniqueIndex},
|
||||||
|
{Cols: []string{"team_id"}},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,6 +46,7 @@ func addTeamMigrations(mg *Migrator) {
|
|||||||
//------- indexes ------------------
|
//------- indexes ------------------
|
||||||
mg.AddMigration("add index team_member.org_id", NewAddIndexMigration(teamMemberV1, teamMemberV1.Indices[0]))
|
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 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
|
// add column email
|
||||||
mg.AddMigration("Add column email to team table", NewAddColumnMigration(teamV1, &Column{
|
mg.AddMigration("Add column email to team table", NewAddColumnMigration(teamV1, &Column{
|
||||||
|
Loading…
Reference in New Issue
Block a user