Dashboards / Folders: delete related data (permissions, stars, tags, versions, annotations) when deleting a dashboard or a folder (#28826)

* Dashboard: delete related data when deleting a dashboard or a folder

* fix migrations order

* apply PR feedback
This commit is contained in:
Agnès Toulet
2020-11-06 09:02:31 +01:00
committed by GitHub
parent 0cbf034483
commit f0421ed08e
4 changed files with 36 additions and 3 deletions
@@ -46,4 +46,7 @@ INSERT INTO dashboard_acl
`
mg.AddMigration("save default acl rules in dashboard_acl table", NewRawSqlMigration(rawSQL))
mg.AddMigration("delete acl rules for deleted dashboards and folders", NewRawSqlMigration(
"DELETE FROM dashboard_acl WHERE dashboard_id NOT IN (SELECT id FROM dashboard) AND dashboard_id != -1"))
}