Merge branch 'spidev' into 'master'

Zeiterfassungs Billing Update/Devices Parents

See merge request fronk/thetool!332
This commit is contained in:
Frank Schubert
2024-04-16 14:13:19 +00:00
10 changed files with 149 additions and 3 deletions
@@ -0,0 +1,39 @@
<?php
use Phinx\Migration\AbstractMigration;
final class FiberPlanDispatcher extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("FiberPlanDispatcher", ["signed" => true]);
$table->addColumn("network_id", "integer", ["null" => false]);
$table->addColumn("object_type", "integer", ["null" => false]);
$table->addColumn("gps_lat", "decimal", ["null" => true, "precision" => 15, "scale" => 10]);
$table->addColumn("gps_long", "decimal", ["null" => true, "precision" => 15, "scale" => 10]);
$table->addColumn("description", "text", ["null" => false]);
$table->addColumn("type", "text", ["null" => true]);
$table->addColumn("comment", "text", ["null" => true]);
$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->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table("FiberPlanDispatcher")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}
@@ -0,0 +1,34 @@
<?php
use Phinx\Migration\AbstractMigration;
final class FiberPlanDispatchersleeve extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("FiberPlanDispatchersleeve", ["signed" => true]);
$table->addColumn("fiberPlanDispatcher_id", "integer", ["null" => false]);
$table->addColumn("name", "text", ["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->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table("FiberPlanDispatchersleeve")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class DeviceAddFieldParentId extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Device", ["signed" => true]);
$table->addColumn("parent_id", "integer", ["null" => true, "after" => "devicetype_id"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("Device")->removeColumn("parent_id")->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}