Minor fixes

This commit is contained in:
Dane Everitt 2017-03-18 20:52:02 -04:00
parent 4a43c53e07
commit 82b3cbc246
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 53 additions and 3 deletions

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddForeignKeyToPacks extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('servers', function (Blueprint $table) {
$table->foreign('pack_id')->references('id')->on('packs');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('servers', function (Blueprint $table) {
$table->dropForeign(['pack_id']);
});
}
}