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