Add support for external_id on servers, closes #975

This commit is contained in:
Dane Everitt 2018-02-24 11:57:12 -06:00
parent f655188c58
commit 633bba6d6e
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
11 changed files with 73 additions and 15 deletions

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddExternalIdColumnToServersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('servers', function (Blueprint $table) {
$table->string('external_id')->after('id')->nullable()->unique();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('servers', function (Blueprint $table) {
$table->dropColumn('external_id');
});
}
}