added new calendar meta to shipping note

This commit is contained in:
Luca Haid
2025-09-01 11:32:12 +02:00
parent b887830988
commit f2d5517b85
5 changed files with 109 additions and 15 deletions
@@ -0,0 +1,30 @@
<?php /** @noinspection ALL */
declare(strict_types = 1);
use Phinx\Migration\AbstractMigration;
final class WarehouseModify24 extends AbstractMigration {
public function up(): void {
if ($this->getEnvironment() == "thetool") {
$WarehouseShippingNote = $this->table("WarehouseShippingNote");
if (!$WarehouseShippingNote->hasColumn("metadata")) {
$WarehouseShippingNote
->addColumn("metadata", "json", ["null" => true, "default" => null, "after" => "type"])
->update();
}
}
}
public function down(): void {
if ($this->getEnvironment() == "thetool") {
$WarehouseShippingNote = $this->table("WarehouseShippingNote");
if ($WarehouseShippingNote->hasColumn("metadata")) {
$WarehouseShippingNote
->removeColumn("metadata")
->update();
}
}
}
}