mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Add folder data migration, fix unique index (#72602)
* add folder data migration, fix unique index * fix unique index * pass a fake store in tests * pass store into other providers in tests * and now with alerting!
This commit is contained in:
@@ -26,6 +26,15 @@ func addFolderMigrations(mg *migrator.Migrator) {
|
||||
Type: migrator.UniqueIndex,
|
||||
Cols: []string{"title", "parent_uid"},
|
||||
}))
|
||||
mg.AddMigration("Remove unique index for folder.title and folder.parent_uid", migrator.NewDropIndexMigration(folderv1(), &migrator.Index{
|
||||
Type: migrator.UniqueIndex,
|
||||
Cols: []string{"title", "parent_uid"},
|
||||
}))
|
||||
|
||||
mg.AddMigration("Add unique index for title, parent_uid, and org_id", migrator.NewAddIndexMigration(folderv1(), &migrator.Index{
|
||||
Type: migrator.UniqueIndex,
|
||||
Cols: []string{"title", "parent_uid", "org_id"},
|
||||
}))
|
||||
}
|
||||
|
||||
func folderv1() migrator.Table {
|
||||
|
||||
Reference in New Issue
Block a user