36 lines
1.1 KiB
PHP
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") {
|
|
|
|
}
|
|
}
|
|
}
|