Merge branch 'WarehouseShippingNote/fix' into 'master'
fix: creating shipping notes See merge request fronk/thetool!1185
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
class WarehouseShippingNoteModel extends TTCrudBaseModel {
|
||||
public int $id;
|
||||
public ?int $billingAddressId;
|
||||
public string $type;
|
||||
public ?string $type;
|
||||
public string $deliveryAddressName;
|
||||
public string $deliveryAddressLine;
|
||||
public string $deliveryAddressPLZ;
|
||||
|
||||
25
db/migrations/20250408150000_warehouse_modify_18.php
Normal file
25
db/migrations/20250408150000_warehouse_modify_18.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php declare(strict_types = 1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class WarehouseModify18 extends AbstractMigration {
|
||||
public function up(): void {
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$WarehouseShippingNoteTable = $this->table("WarehouseShippingNote");
|
||||
$WarehouseShippingNoteTable
|
||||
->changeColumn("type", "string", ["limit" => 255, "default" => null])
|
||||
->save();
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void {
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$WarehouseShippingNoteTable = $this->table("WarehouseShippingNote");
|
||||
if ($WarehouseShippingNoteTable->hasColumn("type")) {
|
||||
$WarehouseShippingNoteTable
|
||||
->changeColumn("type", "string", ["limit" => 255])
|
||||
->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user