Files
thetool/db/migrations/20250102100000_historicbill_modify.php
2025-01-02 10:48:24 +01:00

32 lines
853 B
PHP

<?php declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class HistoricbillModify extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("HistoricBill");
$table->addColumn("brutto_sum", "decimal", ["null" => true, "precision" => 10, "scale" => 4])
->update();
$table->addColumn("fibu_number", "string", ["null" => true, "limit" => 255])
->update();
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("HistoricBill");
$table->removeColumn("brutto_sum")
->update();
$table->removeColumn("fibu_number")
->update();
}
}
}