adds unique index for org_id+folder_id+title on dashboards (#10766)

This commit is contained in:
Carl Bergquist 2018-02-05 14:11:19 +01:00 committed by Torkel Ödegaard
parent 8ce2074eb2
commit 04a94ce396

View File

@ -167,4 +167,8 @@ func addDashboardMigration(mg *Migrator) {
mg.AddMigration("Remove unique index org_id_slug", NewDropIndexMigration(dashboardV2, &Index{ mg.AddMigration("Remove unique index org_id_slug", NewDropIndexMigration(dashboardV2, &Index{
Cols: []string{"org_id", "slug"}, Type: UniqueIndex, Cols: []string{"org_id", "slug"}, Type: UniqueIndex,
})) }))
mg.AddMigration("Add unique index for dashboard_org_id_title_folder_id", NewAddIndexMigration(dashboardV2, &Index{
Cols: []string{"org_id", "folder_id", "title"}, Type: UniqueIndex,
}))
} }