mirror of
https://github.com/grafana/grafana.git
synced 2024-11-24 09:50:29 -06:00
PublicDashboards: Orphaned public dashboard deletion script added (#57917)
* Adds migration to remove orphaned public dashboards. Co-authored-by: Jeff Levin <jeff@levinology.com>
This commit is contained in:
parent
ee8f292c6a
commit
a93b8a03cb
@ -74,4 +74,7 @@ func addPublicDashboardMigration(mg *Migrator) {
|
||||
Nullable: false,
|
||||
Default: "0",
|
||||
}))
|
||||
|
||||
mg.AddMigration("delete orphaned public dashboards", NewRawSQLMigration(
|
||||
"DELETE FROM dashboard_public WHERE dashboard_uid NOT IN (SELECT uid FROM dashboard)"))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user