Fixed invoicing only one of several voicezones with same name

This commit is contained in:
Frank Schubert
2025-11-11 21:41:32 +01:00
parent d00f340a25
commit 937b71244d
4 changed files with 64 additions and 17 deletions
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class BillingVoicenumberAddZoneId extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("BillingVoicenumber");
$table->addColumn("zone_id", "integer", ["null" => true, "default" => null, "after" => "voiceplan"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("BillingVoicenumber")->removeColumn("zone_id")->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
}