mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05: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:
co-authored by
Jeff Levin
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)"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user