Files
thetool/db/migrations/20260115165426_voicenumber_add_disable_reason_canceled.php

34 lines
1003 B
PHP

<?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") {
}
}
}