* Project 8454 (Erweiterung Felder Status, Speicherort, Dokustand Datum) * Schrank breite um 1ne Col verbreitert * neue Migration
38 lines
1.3 KiB
PHP
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") {
|
|
|
|
}
|
|
}
|
|
}
|