Files
thetool/db/migrations/20240709105957_invoice_add_bmd_export.php
2024-07-09 18:50:08 +02:00

32 lines
786 B
PHP

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