Unistore: Keep apiVersion from the legacy SQL table (#103939)

keep apiversion
This commit is contained in:
Ryan McKinley
2025-04-11 22:49:45 +03:00
committed by GitHub
parent 5011907dae
commit b39eaac69e

View File

@ -222,7 +222,9 @@ func (a *dashboardSqlAccess) migrateDashboards(ctx context.Context, orgId int64,
// Now send each dashboard
for i := 1; rows.Next(); i++ {
dash := rows.row.Dash
dash.APIVersion = fmt.Sprintf("%s/v0alpha1", dashboard.GROUP) // << eventually v0
if dash.APIVersion == "" {
dash.APIVersion = fmt.Sprintf("%s/v0alpha1", dashboard.GROUP)
}
dash.SetNamespace(opts.Namespace)
dash.SetResourceVersion("") // it will be filled in by the backend