Files
thetool/db/migrations/20240320124354_rimo_workorder_add_team.php
2024-03-20 19:50:57 +01:00

37 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class RimoWorkorderAddTeam extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("RimoWorkorder");
$table->addColumn("rimo_team_id", "string", ["null" => true, "default" => null, "limit" => 64, "after" => "rimo_status"]);
$table->addColumn("rimo_team_name", "string", ["null" => true, "default" => null, "limit" => 64, "after" => "rimo_team_id"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("RimoWorkorder");
$table->removeColumn("rimo_team_name");
$table->removeColumn("rimo_team_id");
$table->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}