Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create('product_skus', function (Blueprint $table) { |
||
17 | $table->bigIncrements('id'); |
||
18 | $table->unsignedBigInteger('product_id'); |
||
19 | $table->string('code')->unique(); |
||
20 | $table->decimal('price', 8, 2)->default(0); |
||
21 | $table->decimal('cost', 8, 2)->default(0); |
||
22 | |||
23 | |||
24 | $table->foreign('product_id') |
||
25 | ->references('id') |
||
26 | ->on('products') |
||
27 | ->onDelete('cascade'); |
||
28 | }); |
||
41 |