added new features

This commit is contained in:
Luca Haid
2025-06-11 11:40:56 +02:00
parent 29b67ac8e5
commit a8e552416b
6 changed files with 129 additions and 1 deletions
@@ -0,0 +1,28 @@
<?php
declare(strict_types = 1);
use Phinx\Migration\AbstractMigration;
final class ConstructionConsentAddPrioritize extends AbstractMigration {
public function up(): void {
if ($this->getEnvironment() == "thetool") {
$ConstructionConsentTable = $this->table("ConstructionConsent");
if (!$ConstructionConsentTable->hasColumn("prioritize")) {
$ConstructionConsentTable
->addColumn("approve_override", "tinyinteger", ["default" => 0])
->update();
}
}
}
public function down(): void {
if ($this->getEnvironment() == "thetool") {
$ConstructionConsentTable = $this->table("ConstructionConsent");
if ($ConstructionConsentTable->hasColumn("prioritize")) {
$ConstructionConsentTable
->removeColumn("prioritize")
->update();
}
}
}
}