Files
thetool/db/migrations/20250205150003_create_construction_consent_project_address.php
2025-02-11 14:32:02 +01:00

37 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateConstructionConsentProjectAddress extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("ConstructionConsentProjectAddress");
$table->addColumn("constructionconsentproject_id", "integer", ["null" => false]);
$table->addColumn("address_id", "integer", ["null" => false]);
$table->addColumn("create_by", "integer", ["null" => false]);
$table->addColumn("edit_by", "integer", ["null" => false]);
$table->addColumn("create", "integer", ["null" => false]);
$table->addColumn("edit", "integer", ["null" => false]);
$table->create();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("ConstructionConsentProjectAddress")->drop()->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}