Files
thetool/db/migrations/20240709193526_invoice_add_date_delivered.php
2024-07-10 10:06:06 +02:00

32 lines
795 B
PHP

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