Files
w4rpservices/database/migrations/2018_10_29_003021_create_esi_tokens.php

38 lines
865 B
PHP

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