Files
thetool/db/migrations/20240706192917_invoiceposition_add_options.php
2024-07-07 12:04:51 +02:00

32 lines
797 B
PHP

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