Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
13 | public function up() |
||
14 | { |
||
15 | Schema::create('notifications', function (Blueprint $table) { |
||
16 | $table->increments('id'); |
||
17 | $table->bigInteger('from_id')->index()->unsigned(); |
||
18 | $table->string('from_type')->index()->nullable(); |
||
19 | $table->bigInteger('to_id')->index()->unsigned(); |
||
20 | $table->string('to_type')->index()->nullable(); |
||
21 | $table->integer('category_id')->index()->unsigned(); |
||
22 | $table->string('url'); |
||
23 | $table->string('extra')->nullable(); |
||
24 | $table->tinyInteger('read')->default(0); |
||
25 | $table->timestamps(); |
||
26 | |||
27 | $table->foreign('category_id')->references('id') |
||
28 | ->on('notification_categories'); |
||
29 | }); |
||
30 | } |
||
31 | |||
42 |