| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function up() |
||
| 17 | { |
||
| 18 | Schema::create(config('rinvex.oauth.tables.access_tokens'), function (Blueprint $table) { |
||
| 19 | $table->increments('id'); |
||
| 20 | $table->string('identifier', 100); |
||
| 21 | $table->integer('user_id')->unsigned(); |
||
| 22 | $table->string('user_type'); |
||
| 23 | $table->integer('client_id')->unsigned(); |
||
| 24 | $table->string('name')->nullable(); |
||
| 25 | $table->boolean('is_revoked')->default(false); |
||
| 26 | $table->dateTime('expires_at')->nullable(); |
||
| 27 | $table->timestamps(); |
||
| 28 | |||
| 29 | // Indexes |
||
| 30 | $table->unique('identifier'); |
||
| 31 | $table->index(['user_type', 'user_id'], 'access_tokens_user_type_id'); |
||
| 32 | $table->foreign('client_id')->references('id')->on(config('rinvex.oauth.tables.clients')) |
||
| 33 | ->onDelete('cascade')->onUpdate('cascade'); |
||
| 34 | }); |
||
| 35 | } |
||
| 36 | |||
| 47 |