Completed
Push — master ( 895b0e...aee8bc )
by Ricardo
02:27
created

CreateOauthRefreshTokensTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class CreateOauthRefreshTokensTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create(
17
            'oauth_refresh_tokens', function (Blueprint $table) {
18
                $table->string('id', 100)->primary();
19
                $table->string('access_token_id', 100)->index();
20
                $table->boolean('revoked');
21
                $table->dateTime('expires_at')->nullable();
22
            }
23
        );
24
    }
25
26
    /**
27
     * Reverse the migrations.
28
     *
29
     * @return void
30
     */
31
    public function down()
32
    {
33
        Schema::dropIfExists('oauth_refresh_tokens');
34
    }
35
}
36