| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | public function up() |
||
| 9 | { |
||
| 10 | Schema::create('book_store', function (Blueprint $table) { |
||
| 11 | $table->increments('id'); |
||
| 12 | $table->unsignedInteger('book_id'); |
||
| 13 | $table->unsignedInteger('store_id'); |
||
| 14 | $table->timestamps(); |
||
| 15 | |||
| 16 | $table->foreign('book_id') |
||
| 17 | ->references('id') |
||
| 18 | ->on('books') |
||
| 19 | ->onUpdate('CASCADE') |
||
| 20 | ->onDelete('CASCADE'); |
||
| 21 | $table->foreign('store_id') |
||
| 22 | ->references('id') |
||
| 23 | ->on('stores') |
||
| 24 | ->onUpdate('CASCADE') |
||
| 25 | ->onDelete('CASCADE'); |
||
| 26 | }); |
||
| 34 |