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:00 +02:00
parent d92fae07a5
commit 8526025792
5 changed files with 25 additions and 4 deletions

View File

@@ -25,8 +25,9 @@ func (m *MigrationBase) GetCondition() MigrationCondition {
type RawSqlMigration struct {
MigrationBase
sqlite string
mysql string
sqlite string
mysql string
postgres string
}
func (m *RawSqlMigration) Sql(dialect Dialect) string {
@@ -35,6 +36,8 @@ func (m *RawSqlMigration) Sql(dialect Dialect) string {
return m.mysql
case SQLITE:
return m.sqlite
case POSTGRES:
return m.postgres
}
panic("db type not supported")
@@ -50,6 +53,11 @@ func (m *RawSqlMigration) Mysql(sql string) *RawSqlMigration {
return m
}
func (m *RawSqlMigration) Postgres(sql string) *RawSqlMigration {
m.postgres = sql
return m
}
type AddColumnMigration struct {
MigrationBase
tableName string