MySQL: Dashboard.data column type changed to mediumtext (sql migration added), Fixes #1863

This commit is contained in:
Torkel Ödegaard
2015-04-23 16:18:46 +02:00
parent d92fae07a5
commit 8526025792
5 changed files with 25 additions and 4 deletions
@@ -86,4 +86,10 @@ func addDashboardMigration(mg *Migrator) {
}))
mg.AddMigration("drop table dashboard_v1", NewDropTableMigration("dashboard_v1"))
// change column type of dashboard.data
mg.AddMigration("alter dashboard.data to mediumtext v1", new(RawSqlMigration).
Sqlite("SELECT 0 WHERE 0;").
Postgres("SELECT 0;").
Mysql("ALTER TABLE dashboard MODIFY data MEDIUMTEXT;"))
}
@@ -48,4 +48,10 @@ func addDashboardSnapshotMigrations(mg *Migrator) {
mg.AddMigration("create dashboard_snapshot table v5 #2", NewAddTableMigration(snapshotV5))
addTableIndicesMigrations(mg, "v5", snapshotV5)
// ncrease data type
mg.AddMigration("alter dashboard_snapshot.data to mediumtext v1", new(RawSqlMigration).
Sqlite("SELECT 0 WHERE 0;").
Postgres("SELECT 0;").
Mysql("ALTER TABLE dashboard_snapshot.data MODIFY data MEDIUMTEXT;"))
}