| Total Complexity | 2 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | return new class extends Migration |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Run the migrations. |
||
| 16 | * |
||
| 17 | * @return void |
||
| 18 | */ |
||
| 19 | public function up() |
||
| 20 | { |
||
| 21 | Schema::create('items', function (Blueprint $table) { |
||
| 22 | $table->id(); |
||
| 23 | $table->foreignIdFor(Order::class)->constrained()->onUpdate('cascade')->onDelete('cascade'); |
||
| 24 | $table->foreignIdFor(Denomination::class)->constrained()->onUpdate('cascade')->onDelete('cascade'); |
||
| 25 | |||
| 26 | $table->unsignedInteger('quantity_per_bundle'); |
||
| 27 | $table->unsignedInteger('bundle_quantity'); |
||
| 28 | $table->timestamps(); |
||
| 29 | }); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Reverse the migrations. |
||
| 34 | * |
||
| 35 | * @return void |
||
| 36 | */ |
||
| 37 | public function down() |
||
| 40 | } |
||
| 41 | }; |
||
| 42 |