Use nullable columns

This commit is contained in:
James Brooks
2016-12-04 16:32:13 +00:00
parent b5916b7577
commit 984d132902
2 changed files with 2 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ class AlterTableComponentsDropUserIdColumn extends Migration
public function down() public function down()
{ {
Schema::table('components', function (Blueprint $table) { Schema::table('components', function (Blueprint $table) {
$table->integer('user_id')->unsigned()->after('group_id'); $table->integer('user_id')->unsigned()->nullable()->default(null)->after('group_id');
}); });
} }
} }

View File

@@ -31,7 +31,7 @@ class AlterTableIncidentsDropUserIdColumn extends Migration
public function down() public function down()
{ {
Schema::table('incidents', function (Blueprint $table) { Schema::table('incidents', function (Blueprint $table) {
$table->integer('user_id')->unsigned()->after('message'); $table->integer('user_id')->unsigned()->nullable()->default(null)->after('message');
}); });
} }
} }