Files
thetool/db/migrations/20240125183839_address_add_sepa_date.php
T
2024-02-06 20:47:44 +01:00

32 lines
771 B
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AddressAddSepaDate extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Address");
$table->addColumn("sepa_date", "integer", ["null" => true, "default" => null, "after" => "bank_account_bic"]);
$table->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("Address")->removeColumn("sepa_date")->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}