Added Sepa Mandats stuff
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class BillingAddSepa extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("Billing");
|
||||
$table->addColumn("sepa_date", "date", ["null" => true, "default" => null, "after" => "fibu_account_number"]);
|
||||
$table->addColumn("sepa_id", "string", ["null" => true, "default" => null, "after" => "sepa_date"]);
|
||||
$table->addColumn("sepa_last_date", "date", ["null" => true, "default" => null, "after" => "sepa_id"]);
|
||||
$table->update();
|
||||
|
||||
$invoice = $this->table("Invoice");
|
||||
$invoice->addColumn("sepa_date", "date", ["null" => true, "default" => null, "after" => "fibu_account_number"]);
|
||||
$invoice->addColumn("sepa_id", "string", ["null" => true, "default" => null, "after" => "sepa_date"]);
|
||||
$invoice->addColumn("sepa_last_date", "date", ["null" => true, "default" => null, "after" => "sepa_id"]);
|
||||
$invoice->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("Billing");
|
||||
$table->removeColumn("sepa_date");
|
||||
$table->removeColumn("sepa_id");
|
||||
$table->removeColumn("sepa_last_date");
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user