Feature/add historic bills
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?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("invoice_number", "integer", ["null" => 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->save();
|
||||
|
||||
$HistoricBills->addIndex("invoice_number", ["name" => "invoice_number"]);
|
||||
}
|
||||
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void {
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$this->table("HistoricBill")->drop()->save();
|
||||
}
|
||||
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user