Corrected SQL migration for snapshot table column type change, #1880

This commit is contained in:
Torkel Ödegaard 2015-04-25 20:28:50 +02:00
parent 4eeaa6bf9d
commit e410fbb558

View File

@ -49,4 +49,9 @@ func addDashboardSnapshotMigrations(mg *Migrator) {
mg.AddMigration("create dashboard_snapshot table v5 #2", NewAddTableMigration(snapshotV5))
addTableIndicesMigrations(mg, "v5", snapshotV5)
// change column type of dashboard
mg.AddMigration("alter dashboard_snapshot to mediumtext v2", new(RawSqlMigration).
Sqlite("SELECT 0 WHERE 0;").
Postgres("SELECT 0;").
Mysql("ALTER TABLE dashboard_snapshot MODIFY dashboard MEDIUMTEXT;"))
}