Merge branch 'master' into fronkdev
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class Poprackmodulepatch extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$poprackmodulepatch = $this->table("Poprackmodulepatch", ['signed' => true]);
|
||||
$poprackmodulepatch->addColumn("poprackmodule_id", "integer", ["null" => false]);
|
||||
$poprackmodulepatch->addColumn("port", "integer", ["null" => false])->addIndex(['port']);
|
||||
$poprackmodulepatch->addColumn("fiberPlanCable_id", "integer", ["null" => true, "default" => null])->addIndex(['fiberPlanCable_id']);
|
||||
$poprackmodulepatch->addColumn("destination", "integer", ["null" => true, "default" => null, "comment" => "1:startpoint/2:endpoint"]);
|
||||
$poprackmodulepatch->addColumn("create_by", "integer", ["null" => false]);
|
||||
$poprackmodulepatch->addColumn("edit_by", "integer", ["null" => false]);
|
||||
$poprackmodulepatch->addColumn("create", "integer", ["null" => false]);
|
||||
$poprackmodulepatch->addColumn("edit", "integer", ["null" => false]);
|
||||
$poprackmodulepatch->save();
|
||||
$poprackmodulepatch = $this->table("Poprackmodulepatch");
|
||||
$poprackmodulepatch->addForeignKey('poprackmodule_id', 'Poprackmodule', ['id'],['delete'=> 'CASCADE', 'update'=> 'RESTRICT','constraint' => 'poprackmodule_id']);
|
||||
$poprackmodulepatch->save();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$this->table("Poprackmodulepatch")->drop()->save();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class PopNetwork extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$popnetwork = $this->table("PopNetwork", ['signed' => true]);
|
||||
$popnetwork->addColumn("pop_id", "integer", ["null" => false])->addIndex(['pop_id']);
|
||||
$popnetwork->addColumn("network_id", "integer", ["null" => false])->addIndex(['network_id']);
|
||||
$popnetwork->addColumn("create_by", "integer", ["null" => false]);
|
||||
$popnetwork->addColumn("edit_by", "integer", ["null" => false]);
|
||||
$popnetwork->addColumn("create", "integer", ["null" => false]);
|
||||
$popnetwork->addColumn("edit", "integer", ["null" => false]);
|
||||
$popnetwork->save();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$this->table("PopNetwork")->drop()->save();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
use Phinx\Util\Literal;
|
||||
|
||||
final class Timerecording extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$timerecording = $this->table("Timerecording", ["signed" => true]);
|
||||
$timerecording->addColumn("user_id", "integer", ["null" => false])->addIndex(["user_id"]);
|
||||
$timerecording->addColumn("start", "integer", ["null" => true]);
|
||||
$timerecording->addColumn("end", "integer", ["null" => true]);
|
||||
$timerecording->addColumn("timerecordingCategory_id", "integer", ["null" => false]);
|
||||
$timerecording->addColumn("commend", "text", ["null" => true]);
|
||||
$timerecording->addColumn("approved", "integer", ["null" => false, "default" => "0"]);
|
||||
$timerecording->addColumn("completed", "integer", ["null" => false, "default" => "0"]);
|
||||
$timerecording->addColumn("create_by", "integer", ["null" => false]);
|
||||
$timerecording->addColumn("edit_by", "integer", ["null" => false]);
|
||||
$timerecording->addColumn("create", "integer", ["null" => false]);
|
||||
$timerecording->addColumn("edit", "integer", ["null" => false]);
|
||||
$timerecording->save();
|
||||
}
|
||||
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$this->table("Timerecording")->drop()->save();
|
||||
}
|
||||
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class TimerecordingCategory extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$timerecordingCategory = $this->table("TimerecordingCategory", ["signed" => true]);
|
||||
$timerecordingCategory->addColumn("name", "text", ["null" => false]);
|
||||
$timerecordingCategory->addColumn("short", "string", ["null" => true, "limit" => 64]);
|
||||
$timerecordingCategory->addColumn("hourday", "integer", ["null" => false, "default" => "1", "comment" => "1:Stunden/2:Tage/3:Startdatum/4:Enddatum"]);
|
||||
$timerecordingCategory->addColumn("approval", "integer", ["null" => false, "default" => "0"]);
|
||||
$timerecordingCategory->addColumn("require_comment", "integer", ["null" => false, "default" => "0"]);
|
||||
$timerecordingCategory->addColumn("create_by", "integer", ["null" => false]);
|
||||
$timerecordingCategory->addColumn("edit_by", "integer", ["null" => false]);
|
||||
$timerecordingCategory->addColumn("create", "integer", ["null" => false]);
|
||||
$timerecordingCategory->addColumn("edit", "integer", ["null" => false]);
|
||||
$timerecordingCategory->save();
|
||||
}
|
||||
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$this->table("TimerecordingCategory")->drop()->save();
|
||||
}
|
||||
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user