Do things correctly...

This commit is contained in:
Dane Everitt 2017-04-15 23:40:11 -04:00
parent b000b4da43
commit dcc2257fa7
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -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');