31 lines
957 B
PHP
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();
|
|
}
|
|
}
|
|
}
|
|
}
|