Use nullable columns
This commit is contained in:
@@ -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');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user