Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hanspagel/df51b14145081dc5523a235726f82291 to your computer and use it in GitHub Desktop.
Save hanspagel/df51b14145081dc5523a235726f82291 to your computer and use it in GitHub Desktop.
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateOauthAccessTokensTable extends Migration
{
public function up()
{
Schema::create('oauth_access_tokens', function (Blueprint $table) {
$table->string('id', 100)->primary();
$table->uuid('user_id')->index()->nullable();
$table->integer('client_id');
$table->string('name')->nullable();
$table->text('scopes')->nullable();
$table->boolean('revoked');
$table->timestamps();
$table->dateTime('expires_at')->nullable();
});
}
public function down()
{
Schema::drop('oauth_access_tokens');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment