Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function up(): void |
||
17 | { |
||
18 | Schema::create(config('rinvex.oauth.tables.auth_codes'), 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->boolean('is_revoked')->default(false); |
||
25 | $table->dateTime('expires_at')->nullable(); |
||
26 | $table->timestamps(); |
||
27 | |||
28 | // Indexes |
||
29 | $table->unique('identifier'); |
||
30 | $table->index(['user_type', 'user_id'], 'auth_codes_user_type_id'); |
||
31 | $table->foreign('client_id')->references('id')->on(config('rinvex.oauth.tables.clients')) |
||
32 | ->onDelete('cascade')->onUpdate('cascade'); |
||
33 | }); |
||
34 | } |
||
35 | |||
46 |