dashboard_history: SQL did not work when using MySQL, fixes to dashboard version numbering, so inserts start at 1, added migration to fix old dashboards with version 0

This commit is contained in:
Torkel Ödegaard
2017-06-06 15:40:10 +02:00
parent 5409f4c0eb
commit 7b5f7ed553
6 changed files with 17 additions and 6 deletions

View File

@@ -64,6 +64,9 @@ func GetDashboard(c *middleware.Context) {
creator = getUserLogin(dash.CreatedBy)
}
// make sure db version is in sync with json model version
dash.Data.Set("version", dash.Version)
dto := dtos.DashboardFullWithMeta{
Dashboard: dash.Data,
Meta: dtos.DashboardMeta{