Conditions | 2 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function up() |
||
16 | { |
||
17 | Schema::create('quickbooks_tokens', function (Blueprint $table) { |
||
18 | $user_id_type = DB::getSchemaBuilder() |
||
19 | ->getColumnType('users', 'id') === 'bigint' ? 'unsignedBigInteger' : 'unsignedInteger'; |
||
20 | |||
21 | $table->bigIncrements('id'); |
||
22 | $table->{$user_id_type}('user_id'); |
||
23 | $table->unsignedBigInteger('realm_id'); |
||
24 | $table->longtext('access_token'); |
||
25 | $table->datetime('access_token_expires_at'); |
||
26 | $table->string('refresh_token'); |
||
27 | $table->datetime('refresh_token_expires_at'); |
||
28 | |||
29 | $table->timestamps(); |
||
30 | |||
31 | $table->foreign('user_id') |
||
32 | ->references('id') |
||
33 | ->on('users') |
||
34 | ->onDelete('cascade'); |
||
35 | }); |
||
48 |