Fix renaming of table columns for other database drivers

This commit is contained in:
James Brooks
2014-12-23 21:43:18 +00:00
parent 54de752358
commit 072f5885ad

View File

@@ -14,7 +14,7 @@ class AlterTableIncidentsRenameComponentColumn extends Migration
public function up()
{
Schema::table('incidents', function (Blueprint $table) {
DB::statement("ALTER TABLE `incidents` CHANGE `component` `component_id` TINYINT(4) NOT NULL DEFAULT '1'");
$table->rename('component', 'component_id');
});
}
@@ -26,7 +26,7 @@ class AlterTableIncidentsRenameComponentColumn extends Migration
public function down()
{
Schema::table('incidents', function (Blueprint $table) {
DB::statement("ALTER TABLE `incidents` CHANGE `component_id` `component` TINYINT(4) NOT NULL DEFAULT '1'");
$table->rename('component_id', 'component');
});
}
}