fix: creating shipping notes
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
class WarehouseShippingNoteModel extends TTCrudBaseModel {
|
class WarehouseShippingNoteModel extends TTCrudBaseModel {
|
||||||
public int $id;
|
public int $id;
|
||||||
public ?int $billingAddressId;
|
public ?int $billingAddressId;
|
||||||
public string $type;
|
public ?string $type;
|
||||||
public string $deliveryAddressName;
|
public string $deliveryAddressName;
|
||||||
public string $deliveryAddressLine;
|
public string $deliveryAddressLine;
|
||||||
public string $deliveryAddressPLZ;
|
public string $deliveryAddressPLZ;
|
||||||
|
|||||||
@@ -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