| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace VojtaSvoboda\Reviews\Updates; |
||
| 9 | public function up() |
||
| 10 | { |
||
| 11 | Schema::create('vojtasvoboda_reviews_review_category', function($table) |
||
| 12 | { |
||
| 13 | $table->engine = 'InnoDB'; |
||
| 14 | $table->increments('id')->unsigned(); |
||
| 15 | $table->integer('review_id')->unsigned()->nullable()->default(null); |
||
| 16 | $table->integer('category_id')->unsigned()->nullable()->default(null); |
||
| 17 | $table->index(['review_id', 'category_id']); |
||
| 18 | $table->foreign('review_id')->references('id')->on('vojtasvoboda_reviews_reviews')->onDelete('cascade'); |
||
| 19 | $table->foreign('category_id')->references('id')->on('vojtasvoboda_reviews_categories')->onDelete('cascade'); |
||
| 20 | $table->timestamps(); |
||
| 21 | }); |
||
| 22 | } |
||
| 23 | |||
| 29 |