37 lines
1.0 KiB
PHP
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") {
|
|
|
|
}
|
|
}
|
|
}
|