Merge branch 'warehouse-add-order' into 'master'

Added missing column

See merge request fronk/thetool!979
This commit is contained in:
Luca Haid
2025-01-31 15:23:15 +00:00
2 changed files with 23 additions and 0 deletions
@@ -7,6 +7,7 @@
*
* @property int $id Unique identifier for the warehouse order
* @property string $orderNumber Unique order number
* @property int $distributorId ID of the distributor associated with the order
* @property string $delAddrCity City of the delivery address
* @property string $delAddrEMail Email associated with the delivery address
* @property string $delAddrLine Line of the delivery address
@@ -21,6 +22,7 @@
class WarehouseOrderModel extends TTCrudBaseModel {
public int $id;
public string $orderNumber;
public int $distributorId;
public string $delAddrCity;
public string $delAddrEMail;
public string $delAddrLine;
@@ -0,0 +1,21 @@
<?php declare(strict_types = 1);
use Phinx\Migration\AbstractMigration;
final class WarehouseModify10 extends AbstractMigration {
public function up(): void {
if ($this->getEnvironment() == "thetool") {
$table = $this->table("WarehouseOrder");
$table->addColumn("distributorId", "integer", ["null" => false]);
$table->save();;
}
}
public function down(): void {
if ($this->getEnvironment() == "thetool") {
$table = $this->table("WarehouseOrder");
$table->removeColumn("distributorId");
$table->save();;
}
}
}