ConstructionConsent live
This commit is contained in:
@@ -19,8 +19,11 @@ final class ConstructionConsentChangeStatusAndResult extends AbstractMigration
|
||||
$table->addColumn("inhouse_cabling", "integer", ["null" => true, "default" => null, "after" => "conduit_installed_ftu"]);
|
||||
$table->update();
|
||||
|
||||
$this->execute("UPDATE ConstructionConsentOwner SET status=NULL, result=NULL");
|
||||
$cco = $this->table("ConstructionConsentOwner");
|
||||
$cco->changeColumn("status", "enum", ["null" => true, "default" => null, "values" => "new,requested,answered"]);
|
||||
$cco->changeColumn("result", "enum", ["null" => true, "default" => null, "values" => "success,failure"]);
|
||||
|
||||
$this->execute("UPDATE ConstructionConsentOwner SET status=NULL, result=NULL");
|
||||
$cco->changeColumn("status", "enum", ["null" => true, "default" => null, "values" => "new,sent,returned,outstanding"]);
|
||||
$cco->changeColumn("result", "enum", ["null" => true, "default" => null, "values" => "open,accepted,denied,unresolvable"]);
|
||||
$cco->update();
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class ConstructionConsentAddDateDone extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("ConstructionConsent");
|
||||
$table->addColumn("inspection_planner", "integer", ["null" => true, "default" => null, "after" => "inspection_date_planner"]);
|
||||
$table->addColumn("inspection_electrician", "integer", ["null" => true, "default" => null, "after" => "inspection_date_electrician"]);
|
||||
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user