Files
w4rpservices/database/migrations/2018_11_06_013105_create_esi_scopes.php
T
2018-11-05 21:35:17 -06:00

37 lines
846 B
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEsiScopes extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('EsiScopes')) {
Schema::create('EsiScopes', function(Blueprint $table) {
$table->increments('id');
$table->integer('character_id');
$table->foreign('character_id')->references('character_id')->on('EsiToken');
$table->string('scope');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('EsiScopes');
}
}