mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboards: Remove unique name constraints (#90687)
This commit is contained in:
@@ -172,6 +172,7 @@ func addDashboardMigration(mg *Migrator) {
|
||||
{Name: "title", Type: DB_NVarchar, Length: 189, Nullable: false},
|
||||
}))
|
||||
|
||||
// This gets removed later in AddDashboardFolderMigrations
|
||||
mg.AddMigration("Add unique index for dashboard_org_id_title_folder_id", NewAddIndexMigration(dashboardV2, &Index{
|
||||
Cols: []string{"org_id", "folder_id", "title"}, Type: UniqueIndex,
|
||||
}))
|
||||
|
||||
@@ -80,6 +80,12 @@ func addFolderMigrations(mg *migrator.Migrator) {
|
||||
mg.AddMigration("Remove index IDX_folder_parent_uid_org_id", migrator.NewDropIndexMigration(folderv1(), &migrator.Index{
|
||||
Cols: []string{"parent_uid", "org_id"},
|
||||
}))
|
||||
|
||||
// Remove the unique name constraint
|
||||
mg.AddMigration("Remove unique index UQE_folder_org_id_parent_uid_title", migrator.NewDropIndexMigration(folderv1(), &migrator.Index{
|
||||
Type: migrator.UniqueIndex,
|
||||
Cols: []string{"org_id", "parent_uid", "title"},
|
||||
}))
|
||||
}
|
||||
|
||||
func folderv1() migrator.Table {
|
||||
|
||||
Reference in New Issue
Block a user