Files
thetool/db/migrations/20250511155600_pop_add_fields.php
Daniel Spitzer 09aaede76b Pop Feature Erweiterungen
* Project 8454 (Erweiterung Felder Status, Speicherort, Dokustand Datum)
* Schrank breite um 1ne Col verbreitert
* neue Migration
2025-05-11 19:53:31 +02:00

38 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class PopAddFields extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$timerecordingCategory = $this->table("Pop");
$timerecordingCategory->addColumn("state", "integer", ["null" => true, "default" => null,"comment" => "1:Planung/2:Bauphase/3:Grobdoku,4:in Betrieb/5:von Techniker abgenommen", "after" => "vlan_ipv6"]);
$timerecordingCategory->addColumn("folder_link", "text", ["null" => true, "default" => null, "after" => "state"]);
$timerecordingCategory->addColumn("doku_date", "integer", ["null" => true, "default" => null, "after" => "folder_link"]);
$timerecordingCategory->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table('Pop');
$table->removeColumn("state");
$table->removeColumn("folder_link");
$table->removeColumn("doku_date");
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
}