This repository has been archived on 2026-11-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
thetool/db/migrations/20240625164727_contract_add_vat.php
T

34 lines
811 B
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class ContractAddVat extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Contract");
$table->addColumn("vatgroup_id", "integer", ["null" => false, "after" => "price_setup"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Contract");
$table->removeColumn("vatgroup_id");
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
}