From 2e3627783e778373bcf881724d6b96528a942218 Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Fri, 31 Jan 2025 16:22:09 +0100 Subject: [PATCH] Added missing column --- .../WarehouseOrder/WarehouseOrderModel.php | 2 ++ .../20250131160000_warehouse_modify_11.php | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 db/migrations/20250131160000_warehouse_modify_11.php diff --git a/application/WarehouseOrder/WarehouseOrderModel.php b/application/WarehouseOrder/WarehouseOrderModel.php index d7ab75997..84070625f 100644 --- a/application/WarehouseOrder/WarehouseOrderModel.php +++ b/application/WarehouseOrder/WarehouseOrderModel.php @@ -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; diff --git a/db/migrations/20250131160000_warehouse_modify_11.php b/db/migrations/20250131160000_warehouse_modify_11.php new file mode 100644 index 000000000..77fa7b78c --- /dev/null +++ b/db/migrations/20250131160000_warehouse_modify_11.php @@ -0,0 +1,21 @@ +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();; + } + } +}