Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create('redirect', function (Blueprint $table) { |
||
17 | $table->increments('id'); |
||
18 | $table->boolean('active')->default(false); |
||
19 | $table->integer('clicks')->default(0); |
||
20 | $table->string('url')->unique(); |
||
21 | $table->string('redirect_url')->nullable(); |
||
22 | $table->integer('shop_id')->unsigned()->nullable(); |
||
23 | $table->foreign('shop_id')->references('id')->on('shop')->onDelete('cascade'); |
||
24 | $table->integer('modified_by_user_id')->unsigned()->nullable(); |
||
25 | $table->foreign('modified_by_user_id')->references('id')->on('user')->onDelete('set null'); |
||
26 | $table->timestamps(); |
||
27 | }); |
||
40 |