Files
thetool/db/migrations/20240806174939_contractqueue_add_voicenumber.php
2024-08-06 21:03:58 +02:00

36 lines
1010 B
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class ContractqueueAddVoicenumber extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Contractqueue");
$table->addColumn("voicenumber", "json", ["null" => true, "default" => null, "after" => "crediting_matchcode"]);
$table->addColumn("voiceplan_id", "integer", ["null" => true, "default" => null, "after" => "voicenumber"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("Contractqueue")
->removeColumn("voiceplan_id")
->removeColumn("voicenumber")
->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
}