Added new Voicenumber delete_reason

This commit is contained in:
Frank Schubert
2026-01-15 18:09:39 +01:00
parent 069112bcfa
commit 3241b8027d
5 changed files with 44 additions and 3 deletions

View File

@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class VoicenumberAddDisableReasonCanceled extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Voicenumber");
$table->changeColumn("disabled", "integer", ["null" => false, "default" => 0]);
$table->changeColumn("disabled_reason", "enum", ["values" => "ported_out,ported_back,reserved,legacy,damaged,contract_cancelled", "null" => true, "default" => null]);
$table->addColumn("disabled_by", "integer", ["null" => true, "default" => null, "after" => "disabled_reason"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
}
if($this->getEnvironment() == "addressdb") {
}
}
}