46 lines
2.1 KiB
PHP
46 lines
2.1 KiB
PHP
<?php /** @noinspection ALL */
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class AddHistoricBill extends AbstractMigration {
|
|
public function up(): void {
|
|
if ($this->getEnvironment() == "thetool") {
|
|
//HistoricTicket Table
|
|
$HistoricBills = $this->table("HistoricBill", ["signed" => true]);
|
|
|
|
$HistoricBills->addColumn("cinvoice_number", "string", ["null" => false, "limit" => 255]);
|
|
$HistoricBills->addColumn("invoice_number", "string", ["null" => false, "limit" => 255]);
|
|
$HistoricBills->addColumn("cid", "integer", ["null" => false, "default" => "0"]);
|
|
$HistoricBills->addColumn("address1", "string", ["null" => false, "limit" => 255]);
|
|
$HistoricBills->addColumn("address2", "string", ["null" => false, "limit" => 255]);
|
|
$HistoricBills->addColumn("address3", "string", ["null" => false, "limit" => 255]);
|
|
$HistoricBills->addColumn("address4", "string", ["null" => false, "limit" => 255]);
|
|
$HistoricBills->addColumn("date_outgoing", "date", ["null" => false]);
|
|
$HistoricBills->addColumn("bankcode", "string", ["null" => false, "limit" => 255]);
|
|
$HistoricBills->addColumn("accountnumber", "string", ["null" => false, "limit" => 255]);
|
|
$HistoricBills->addColumn("BIC", "string", ["null" => false, "limit" => 255]);
|
|
$HistoricBills->addColumn("IBAN", "string", ["null" => false, "limit" => 255]);
|
|
$HistoricBills->addColumn("Mandatinvoice_number", "string", ["null" => false, "limit" => 255]);
|
|
$HistoricBills->addColumn("payment", "integer", ["null" => false, "default" => "0"]);
|
|
|
|
$HistoricBills->addIndex("invoice_number", ["name" => "invoice_number"]);
|
|
$HistoricBills->save();
|
|
}
|
|
|
|
if ($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
|
|
public function down(): void {
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$this->table("HistoricBill")->drop()->save();
|
|
}
|
|
|
|
if ($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
}
|