This commit is contained in:
James Brooks
2014-12-31 17:49:09 +00:00
parent e7fe720be7
commit e136a8df83

View File

@@ -11,7 +11,11 @@ class AlterTableSettingsValueLongText extends Migration
*/
public function up()
{
DB::statement("ALTER TABLE settings CHANGE `value` `value` LONGTEXT;");
if (Config::get('database')['default'] === 'mysql') {
DB::statement("ALTER TABLE settings CHANGE `value` `value` LONGTEXT;");
} elseif (Config::get('database')['default'] === 'pgsql') {
DB::statement("ALTER TABLE settings CHANGE `value` `value` TEXT;");
}
}
/**
@@ -21,6 +25,10 @@ class AlterTableSettingsValueLongText extends Migration
*/
public function down()
{
DB::statement("ALTER TABLE settings CHANGE `value` `value` TEXT;");
if (Config::get('database')['default'] === 'mysql') {
DB::statement("ALTER TABLE settings CHANGE `value` `value` TEXT;");
} elseif (Config::get('database')['default'] === 'pgsql') {
DB::statement("ALTER TABLE settings CHANGE `value` `value` TEXT;");
}
}
}