Browse Source

fix: changed dashboard title length to match slug length, will fix mysql index size issue, fixes #10779

Torkel Ödegaard 7 years ago
parent
commit
cf7be5da0b
1 changed files with 5 additions and 0 deletions
  1. 5 0
      pkg/services/sqlstore/migrations/dashboard_mig.go

+ 5 - 0
pkg/services/sqlstore/migrations/dashboard_mig.go

@@ -168,7 +168,12 @@ func addDashboardMigration(mg *Migrator) {
 		Cols: []string{"org_id", "slug"}, Type: UniqueIndex,
 	}))
 
+	mg.AddMigration("Update dashboard title length", NewTableCharsetMigration("dashboard", []*Column{
+		{Name: "title", Type: DB_NVarchar, Length: 189, Nullable: false},
+	}))
+
 	mg.AddMigration("Add unique index for dashboard_org_id_title_folder_id", NewAddIndexMigration(dashboardV2, &Index{
 		Cols: []string{"org_id", "folder_id", "title"}, Type: UniqueIndex,
 	}))
+
 }