Files
thetool/db/migrations/20250328142831_preorder_billing_add_fibu.php
Frank Schubert 17405c8c5d PreorderBilling
2025-03-31 13:50:49 +02:00

36 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class PreorderBillingAddFibu extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("PreorderBilling");
$table->addColumn("fibu_cost_account", "string", ["null" => true, "default" => null, "length" => 255, "after" => "fibu_account_number"]);
$table->addColumn("fibu_revenue_account", "string", ["null" => true, "default" => null, "length" => 255, "after" => "fibu_cost_account"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("PreorderBilling");
$table->removeColumn("fibu_cost_account");
$table->removeColumn("fibu_revenue_account");
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
}