Files
thetool/db/migrations/20250604110000_warehouse_modify_23.php
2025-06-04 12:50:43 +02:00

31 lines
957 B
PHP

<?php /** @noinspection ALL */
declare(strict_types = 1);
use Phinx\Migration\AbstractMigration;
final class WarehouseModify23 extends AbstractMigration {
public function up(): void {
if ($this->getEnvironment() == "thetool") {
$WarehouseOffer = $this->table("WarehouseOffer");
if ($WarehouseOffer->hasColumn("customerVAT")) {
$WarehouseOffer
->changeColumn("customerVAT", "string", ["limit" => 255, "null" => true])
->update();
}
}
}
public function down(): void {
if ($this->getEnvironment() == "thetool") {
$WarehouseOffer = $this->table("WarehouseOffer");
if ($WarehouseOffer->hasColumn("customerVAT")) {
$WarehouseOffer
->changeColumn("customerVAT", "string", ["limit" => 255, "null" => false])
->update();
}
}
}
}