| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function up() |
||
| 14 | { |
||
| 15 | Schema::create('language', function (Blueprint $table) { |
||
| 16 | $table->increments('id'); |
||
| 17 | $table->text('language')->nullable(); |
||
| 18 | $table->integer('modified_by_user_id')->unsigned()->nullable(); |
||
| 19 | $table->foreign('modified_by_user_id')->references('id')->on('user')->onDelete('set null'); |
||
| 20 | $table->integer('shop_id')->unsigned(); |
||
| 21 | $table->foreign('shop_id')->references('id')->on('shop')->onDelete('cascade'); |
||
| 22 | $table->timestamps(); |
||
| 23 | }); |
||
| 24 | |||
| 25 | Schema::table('shop', function (Blueprint $table) { |
||
| 26 | $table->foreign('language_id')->references('id')->on('language')->onDelete('set null'); |
||
| 27 | }); |
||
| 28 | |||
| 29 | Schema::table('user', function (Blueprint $table) { |
||
| 30 | $table->foreign('language_id')->references('id')->on('language')->onDelete('set null'); |
||
| 31 | }); |
||
| 44 |