Cleanup migration

This commit is contained in:
Dane Everitt 2020-04-10 14:02:16 -07:00
parent fd8b7182e7
commit 568328596a
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
1 changed files with 1 additions and 5 deletions

View File

@ -13,8 +13,6 @@ class AddTableServerTransfers extends Migration
*/
public function up()
{
Schema::dropIfExists('server_transfers');
Schema::create('server_transfers', function (Blueprint $table) {
$table->increments('id');
$table->integer('server_id')->unsigned();
@ -26,10 +24,8 @@ class AddTableServerTransfers extends Migration
$table->string('old_additional_allocations')->nullable();
$table->string('new_additional_allocations')->nullable();
$table->timestamps();
});
Schema::table('server_transfers', function (Blueprint $table) {
$table->foreign('server_id')->references('id')->on('servers');
$table->foreign('server_id')->references('id')->on('servers')->onDelete('cascade');
});
}