Files
thetool/db/migrations/20250212163043_construction_consent_owner_add_cols.php
T

36 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class ConstructionConsentOwnerAddCols extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("ConstructionConsentOwner");
$table->addColumn("title", "string", ["null" => true, "default" => null, "limit" => 255, "after" => "constructionconsent_id"]);
$table->addColumn("birthdate", "date", ["null" => true, "default" => null, "after" => "email"]);
$table->addColumn("phone2", "string", ["null" => true, "default" => null, "limit" => 255, "after" => "phone"]);
$table->addColumn("firstname", "string", ["null" => true, "default" => null, "limit" => 255, "after" => "title"]);
$table->renameColumn("name", "lastname");
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
}
if($this->getEnvironment() == "addressdb") {
}
}
}