Added missing column
This commit is contained in:
@@ -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();;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user