mirror of
https://github.com/grafana/grafana.git
synced 2025-01-28 17:24:59 -06:00
add team_member index on user_id org_id (#91819)
This pr adds a composite index on on the team_member table on user_id and org_id
This commit is contained in:
parent
b2eeb0dd6e
commit
8961f392f0
@ -51,6 +51,7 @@ func addTeamMigrations(mg *Migrator) {
|
||||
{Cols: []string{"org_id"}},
|
||||
{Cols: []string{"org_id", "team_id", "user_id"}, Type: UniqueIndex},
|
||||
{Cols: []string{"team_id"}},
|
||||
{Cols: []string{"user_id", "org_id"}},
|
||||
},
|
||||
}
|
||||
|
||||
@ -73,4 +74,5 @@ func addTeamMigrations(mg *Migrator) {
|
||||
mg.AddMigration("Add column permission to team_member table", NewAddColumnMigration(teamMemberV1, &Column{
|
||||
Name: "permission", Type: DB_SmallInt, Nullable: true,
|
||||
}))
|
||||
mg.AddMigration("add unique index team_member_user_id_org_id", NewAddIndexMigration(teamMemberV1, teamMemberV1.Indices[3]))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user