Do things correctly...
This commit is contained in:
parent
b000b4da43
commit
dcc2257fa7
1 changed files with 2 additions and 5 deletions
|
@ -30,10 +30,6 @@ class UpgradeTaskSystem extends Migration
|
||||||
$task->save();
|
$task->save();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::table('tasks', function (Blueprint $table) {
|
|
||||||
$table->unsignedInteger('user_id')->nullable(false)->change();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,7 +40,8 @@ class UpgradeTaskSystem extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('tasks', function (Blueprint $table) {
|
Schema::table('tasks', function (Blueprint $table) {
|
||||||
$table->dropForeign(['server_id', 'user_id']);
|
$table->dropForeign(['server_id']);
|
||||||
|
$table->dropForeign(['user_id']);
|
||||||
|
|
||||||
$table->renameColumn('server_id', 'server');
|
$table->renameColumn('server_id', 'server');
|
||||||
$table->dropColumn('user_id');
|
$table->dropColumn('user_id');
|
||||||
|
|
Loading…
Reference in a new issue