Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function run() |
||
12 | { |
||
13 | $tableName = 'user_tokens'; |
||
14 | Capsule::schema()->dropIfExists($tableName); |
||
15 | Capsule::schema()->create($tableName, function (Blueprint $table) { |
||
16 | $table->increments('id'); |
||
17 | $table->integer('user_id')->index()->unsigned(); |
||
18 | $table->string('user_ip')->nullable(); |
||
19 | $table->string('device_token')->nullable(); |
||
20 | $table->string('device_name')->nullable(); |
||
21 | $table->string('token'); |
||
22 | $table->dateTime('last_usage'); |
||
23 | $table->timestamps(); |
||
24 | |||
25 | $table->unique('token'); |
||
26 | }); |
||
27 | } |
||
28 | |||
29 | } |