mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: set schemaVersion on dashboard schema (CUE) (#87712)
* fix: set schemaVersion on dashboard schema (CUE) * docs: add comment to migration code * fix: run make gen-cue
This commit is contained in:
committed by
GitHub
parent
ef07dfa3bb
commit
e1685cb44b
@@ -74,7 +74,7 @@ lineage: schemas: [{
|
||||
|
||||
// Version of the JSON schema, incremented each time a Grafana update brings
|
||||
// changes to said schema.
|
||||
schemaVersion: uint16 | *36
|
||||
schemaVersion: uint16 | *39
|
||||
|
||||
// Version of the dashboard, incremented each time the dashboard is updated.
|
||||
version?: uint32
|
||||
|
||||
@@ -1182,7 +1182,7 @@ export const defaultDashboard: Partial<Dashboard> = {
|
||||
graphTooltip: DashboardCursorSync.Off,
|
||||
links: [],
|
||||
panels: [],
|
||||
schemaVersion: 36,
|
||||
schemaVersion: 39,
|
||||
tags: [],
|
||||
timezone: 'browser',
|
||||
};
|
||||
|
||||
@@ -76,6 +76,10 @@ type PanelSchemeUpgradeHandler = (panel: PanelModel) => PanelModel;
|
||||
* To add a dashboard migration increment this number
|
||||
* and then add your migration at the bottom of 'updateSchema'
|
||||
* hint: search "Add migration here"
|
||||
*
|
||||
* This number also needs to be updated on the CUE schema:
|
||||
* kinds/dashboard/dashboard_kind.cue
|
||||
* Example PR: #87712
|
||||
*/
|
||||
export const DASHBOARD_SCHEMA_VERSION = 39;
|
||||
export class DashboardMigrator {
|
||||
|
||||
Reference in New Issue
Block a user