Merge branch 'master' into fronkdev

This commit is contained in:
Frank Schubert
2024-04-18 14:05:22 +02:00
106 changed files with 10509 additions and 211 deletions

View File

@@ -0,0 +1,79 @@
<?php /** @noinspection ALL */
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AddHistoricTicket extends AbstractMigration {
public function up(): void {
if ($this->getEnvironment() == "thetool") {
//HistoricTicket Table
$historicTicket = $this->table("HistoricTicket", ["signed" => true]);
$historicTicket->addColumn("ticket_number", "integer", ["null" => true]);
$historicTicket->addColumn("ticket_verifier", "string", ["null" => false, "default" => "0", "limit" => 255]);
$historicTicket->addColumn("priority", "integer", ["null" => false, "default" => "1"]);
$historicTicket->addColumn("status_id", "integer", ["null" => false, "default" => "0"]);
$historicTicket->addColumn("status", "string", ["null" => true, "limit" => 255]);
$historicTicket->addColumn("type_id", "integer", ["null" => false, "default" => "0"]);
$historicTicket->addColumn("type", "string", ["null" => true, "limit" => 255]);
$historicTicket->addColumn("user_id", "integer", ["null" => false, "default" => "0"]);
$historicTicket->addColumn("agent_id", "integer", ["null" => false, "default" => "0"]);
$historicTicket->addColumn("contact_id", "integer", ["null" => false, "default" => "0"]);
$historicTicket->addColumn("company", "string", ["null" => false, "limit" => 255]);
$historicTicket->addColumn("company_id", "integer", ["null" => false, "default" => "0"]);
$historicTicket->addColumn("first_name", "string", ["null" => false, "limit" => 255]);
$historicTicket->addColumn("middle_name", "string", ["null" => false, "limit" => 255]);
$historicTicket->addColumn("last_name", "string", ["null" => false, "limit" => 255]);
$historicTicket->addColumn("email", "string", ["null" => false, "limit" => 255]);
$historicTicket->addColumn("phone", "string", ["null" => false, "limit" => 255]);
$historicTicket->addColumn("subject", "string", ["null" => false, "limit" => 255]);
$historicTicket->addColumn("ctime", "integer", ["null" => false, "default" => "0"]);
$historicTicket->addColumn("mtime", "integer", ["null" => false, "default" => "0"]);
$historicTicket->addColumn("muser_id", "integer", ["null" => false, "default" => "0"]);
$historicTicket->addColumn("files_folder_id", "integer", ["null" => false, "default" => "0"]);
$historicTicket->addColumn("unseen", "integer", ["null" => false, "default" => "1"]);
$historicTicket->addColumn("group_id", "integer", ["null" => false, "default" => "0"]);
$historicTicket->addColumn("order_id", "integer", ["null" => false, "default" => "0"]);
$historicTicket->addColumn("last_response_time", "integer", ["null" => false, "default" => "0"]);
$historicTicket->addColumn("cc_addresses", "string", ["null" => false, "limit" => 255]);
$historicTicket->save();
//HistoricTicketMessage Table
$historicTicketMessage = $this->table("HistoricTicketMessage", ["signed" => true]);
$historicTicketMessage->addColumn("ticket_id", "integer", ["null" => false]);
$historicTicketMessage->addColumn("status_id", "integer", ["null" => false, "default" => "0"]);
$historicTicketMessage->addColumn("type_id", "integer", ["null" => false, "default" => "0"]);
$historicTicketMessage->addColumn("has_status", "integer", ["null" => false, "default" => "0", "limit" => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY]);
$historicTicketMessage->addColumn("has_type", "integer", ["null" => false, "default" => "0", "limit" => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY]);
$historicTicketMessage->addColumn("content", "text", ["null" => true]);
$historicTicketMessage->addColumn("attachments", "string", ["null" => false, "limit" => 255]);
$historicTicketMessage->addColumn("is_note", "integer", ["null" => false, "default" => "0", "limit" => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY]);
$historicTicketMessage->addColumn("user_id", "integer", ["null" => false, "default" => "0"]);
$historicTicketMessage->addColumn("ctime", "integer", ["null" => false]);
$historicTicketMessage->addColumn("mtime", "integer", ["null" => false]);
$historicTicketMessage->addColumn("rate_id", "integer", ["null" => false, "default" => "0"]);
$historicTicketMessage->addColumn("rate_amount", "integer", ["null" => false, "default" => "0"]);
$historicTicketMessage->addColumn("rate_hours", "integer", ["null" => false, "default" => "0"]);
$historicTicketMessage->addColumn("rate_name", "string", ["null" => false, "limit" => 255]);
$historicTicketMessage->addColumn("rate_cost_code", "string", ["null" => true, "limit" => 255]);
$historicTicketMessage->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
public function down(): void {
if ($this->getEnvironment() == "thetool") {
$this->table("HistoricTicket")->drop()->save();
$this->table("HistoricTicketMessage")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}

View File

@@ -0,0 +1,64 @@
<?php /** @noinspection ALL */
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AddDomain extends AbstractMigration {
public function up(): void {
if ($this->getEnvironment() == "thetool") {
//Domain Table
$domainTable = $this->table("Domain", ["signed" => true]);
$domainTable->addColumn("inwxRoId", "integer", ["null" => true]);
$domainTable->addColumn("domain", "string", ["null" => true, "limit" => 255]);
$domainTable->addColumn("period", "string", ["null" => true, "limit" => 50]);
$domainTable->addColumn("crDate", "integer", ["null" => true]);
$domainTable->addColumn("exDate", "integer", ["null" => true]);
$domainTable->addColumn("reDate", "integer", ["null" => true]);
$domainTable->addColumn("upDate", "integer", ["null" => true]);
$domainTable->addColumn("transferLock", "integer", ["null" => true, "limit" => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY]);
$domainTable->addColumn("status", "string", ["null" => true, "limit" => 50]);
$domainTable->addColumn("authCode", "string", ["null" => true, "limit" => 50]);
$domainTable->addColumn("registrant", "integer", ["null" => true]);
$domainTable->addColumn("admin", "integer", ["null" => true]);
$domainTable->addColumn("tech", "integer", ["null" => true]);
$domainTable->addColumn("billing", "integer", ["null" => true]);
$domainTable->addColumn("ns", "string", ["null" => true, "limit" => 255]);
$domainTable->addColumn("pleskId", "string", ["null" => true, "limit" => 255]);
$domainTable->addColumn("pleskHostingType", "string", ["null" => true, "limit" => 255]);
$domainTable->addColumn("pleskCreated", "integer", ["null" => true]);
$domainTable->save();
//DomainContact Table
$domainContactTable = $this->table("DomainContact", ["signed" => true]);
$domainContactTable->addColumn("inwxRoId", "integer", ["null" => true]);
$domainContactTable->addColumn("type", "string", ["null" => true, "limit" => 255]);
$domainContactTable->addColumn("name", "string", ["null" => true, "limit" => 255]);
$domainContactTable->addColumn("street", "string", ["null" => true, "limit" => 255]);
$domainContactTable->addColumn("city", "string", ["null" => true, "limit" => 255]);
$domainContactTable->addColumn("pc", "string", ["null" => true, "limit" => 255]);
$domainContactTable->addColumn("cc", "string", ["null" => true, "limit" => 255]);
$domainContactTable->addColumn("voice", "string", ["null" => true, "limit" => 255]);
$domainContactTable->addColumn("email", "string", ["null" => true, "limit" => 255]);
$domainContactTable->addColumn("protection", "integer", ["null" => true, "limit" => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY]);
$domainContactTable->addColumn("usedCount", "integer", ["null" => true]);
$domainContactTable->addColumn("verificationStatus", "string", ["null" => true, "limit" => 255]);
$domainContactTable->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
public function down(): void {
if ($this->getEnvironment() == "thetool") {
$this->table("Domain")->drop()->save();
$this->table("DomainContact")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}

View File

@@ -0,0 +1,40 @@
<?php
use Phinx\Migration\AbstractMigration;
final class TimerecordingCar extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("TimerecordingCar", ["signed" => true]);
$table->addColumn("number_plate", "string", ["null" => false]);
$table->addColumn("brand", "text", ["null" => true]);
$table->addColumn("model", "text", ["null" => true]);
$table->addColumn("mileage", "integer", ["null" => true]);
$table->addColumn("mileage_now", "integer", ["null" => true]);
$table->addColumn("mileage_timestamp", "integer", ["null" => true]);
$table->addColumn("initial_approval", "integer", ["null" => true]);
$table->addColumn("timerecording", "integer", ["default" => 1]);
$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("TimerecordingCar")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}
?>

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class TimerecordingAddFieldsCar extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("Timerecording", ["signed" => true]);
$table->addColumn("timerecordingCar_id", "integer", ["null" => true, "default" => NULL, "after" => "businesstrip_info"]);
$table->addColumn("mileage_start", "integer", ["null" => true, "default" => NULL, "after" => "timerecordingCar_id"]);
$table->addColumn("mileage_end", "integer", ["null" => true, "default" => NULL, "after" => "mileage_start"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table("Timerecording")->removeColumn("timerecordingCar")->save();
$this->table("Timerecording")->removeColumn("mileage_start")->save();
$this->table("Timerecording")->removeColumn("mileage_end")->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}

View File

@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class TimerecordingCategoryAddFieldUnpaid extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("TimerecordingCategory", ["signed" => true]);
$table->addColumn("unpaid", "integer", ["null" => false, "default" => '0', "after" => "businesstrip"]);
$table->update();
}
if ($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table("TimerecordingCategory")->removeColumn("unpaid")->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class TimerecordingCarAddFieldInitialapproval extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("TimerecordingCar", ["signed" => true]);
$table->addColumn("first_approval", "integer", ["null" => true, "default" => NULL, "after" => "initial_approval"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("TimerecordingCar")->removeColumn("initial_approval")->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class TimerecordingEmployeeAddFieldBmd extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("TimerecordingEmployee", ["signed" => true]);
$table->addColumn("bmd_active", "integer", ["null" => false, "default" => 1, "after" => "bpahours"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("TimerecordingEmployee")->removeColumn("bmd_active")->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}

View File

@@ -0,0 +1,35 @@
<?php
use Phinx\Migration\AbstractMigration;
final class TimerecordingBilling extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("TimerecordingBilling", ["signed" => true]);
$table->addColumn("month", "string", ["null" => false]);
$table->addColumn("closetime", "integer", ["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("TimerecordingBilling")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}
?>

View File

@@ -0,0 +1,48 @@
<?php
use Phinx\Migration\AbstractMigration;
final class TimerecordingBillingEmployee extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("TimerecordingBillingEmployee", ["signed" => true]);
$table->addColumn("timerecordingBilling_id", "integer", ["null" => false]);
$table->addColumn("timerecordingEmployee_id", "integer", ["null" => false]);
$table->addColumn("musthours", "integer", ["null" => false]);
$table->addColumn("ishours", "integer", ["null" => false]);
$table->addColumn("ishourssum", "integer", ["null" => false]);
$table->addColumn("plushours25", "integer", ["null" => false, "default" => "0"]);
$table->addColumn("overtime50", "integer", ["null" => false, "default" => "0"]);
$table->addColumn("overtime50free", "integer", ["null" => false, "default" => "0"]);
$table->addColumn("overtime100", "integer", ["null" => false, "default" => "0"]);
$table->addColumn("overtime100free", "integer", ["null" => false, "default" => "0"]);
$table->addColumn("homeoffice", "integer", ["null" => false, "default" => "0"]);
$table->addColumn("diet", "decimal", ["null" => false, "default" => "0", "precision" => 10, "scale" => 2]);
$table->addColumn("nlz", "text", ["null" => true]);
$table->addColumn("nlz_detail", "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("TimerecordingBillingEmployee")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}
?>

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class TimerecordingCarAddFieldUser extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("TimerecordingCar", ["signed" => true]);
$table->addColumn("user_id", "integer", ["null" => true, "after" => "id"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("TimerecordingCar")->removeColumn("user_id")->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}

View File

@@ -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") {
}
}
}

View File

@@ -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") {
}
}
}

View File

@@ -0,0 +1,45 @@
<?php /** @noinspection ALL */
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AddVoiceCallHistory extends AbstractMigration {
public function up(): void {
if ($this->getEnvironment() == "thetool") {
//VoiceCallHistory Table
$voiceCallHistoryTable = $this->table("VoiceCallHistory", ["signed" => true]);
$voiceCallHistoryTable->addColumn("uid", "string", ["null" => false, "limit" => 255]);
$voiceCallHistoryTable->addColumn("voice_account", "string", ["null" => true, "limit" => 255]);
$voiceCallHistoryTable->addColumn("start", "datetime", ["null" => false]);
$voiceCallHistoryTable->addColumn("source", "string", ["null" => true, "limit" => 255]);
$voiceCallHistoryTable->addColumn("destination", "string", ["null" => true, "limit" => 255]);
$voiceCallHistoryTable->addColumn("state", "integer", ["null" => true]);
$voiceCallHistoryTable->addColumn("billable", "integer", ["null" => false, "limit" => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY]);
$voiceCallHistoryTable->addColumn("duration", "integer", ["null" => false]);
//VoiceCallHistory Table Indexes
$voiceCallHistoryTable->addIndex(["billable"]);
$voiceCallHistoryTable->addIndex(["voice_account"]);
$voiceCallHistoryTable->addIndex(["uid"], ["unique" => true]);
$voiceCallHistoryTable->save();
//VoiceCallHistoryJob Table
$voiceCallHistoryJobTable = $this->table("VoiceCallHistoryJob", ["signed" => true]);
$voiceCallHistoryJobTable->addColumn("date", "date", ["null" => false]);
$voiceCallHistoryJobTable->addColumn("status", "enum", ["values" => ["created", "pending", "running", "success", "failed"], "default" => "created", "null" => false]);
$voiceCallHistoryJobTable->addColumn("finished", "date", ["null" => true]);
$voiceCallHistoryJobTable->addIndex(["date"], ["unique" => true]);
$voiceCallHistoryJobTable->save();
}
}
public function down(): void {
if ($this->getEnvironment() == "thetool") {
$this->table("VoiceCallHistory")->drop()->save();
$this->table("VoiceCallHistoryJob")->drop()->save();
}
}
}

View File

@@ -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") {
}
}
}

View File

@@ -0,0 +1,50 @@
<?php
use Phinx\Migration\AbstractMigration;
final class FiberPlanPipe extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("FiberPlanPipe", ["signed" => true]);
$table->addColumn("description", "text", ["null" => false]);
$table->addColumn("gisid", "text", ["null" => true]);
$table->addColumn("type", "integer", ["null" => false]);
$table->addColumn("type_description", "integer", ["null" => true]);
$table->addColumn("fiberPlanPipeTemplate_id", "integer", ["null" => true]);
$table->addColumn("length", "integer", ["null" => false]);
$table->addColumn("startpoint_type", "integer", ["null" => false]);
$table->addColumn("startpoint_network_id", "integer", ["null" => false]);
$table->addColumn("startpoint", "integer", ["null" => false]);
$table->addColumn("midpoint", "text", ["null" => true]);
$table->addColumn("entpoint_type", "integer", ["null" => false]);
$table->addColumn("endpoint_network_id", "integer", ["null" => false]);
$table->addColumn("endpoint", "integer", ["null" => false]);
$table->addColumn("status", "integer", ["null" => false]);
$table->addColumn("responsible", "integer", ["null" => false]);
$table->addColumn("responsible_text", "text", ["null" => true]);
$table->addColumn("address_id", "integer", ["null" => true]);
$table->addColumn("comment", "text", ["null" => true]);
$table->addColumn("edit_by", "integer", ["null" => false]);
$table->addColumn("create_by", "integer", ["null" => false]);
$table->addColumn("edit", "integer", ["null" => false]);
$table->addColumn("create", "integer", ["null" => false]);
$table->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table("FiberPlanPipe")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Phinx\Migration\AbstractMigration;
final class FiberPlanPipeManufacturer extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("FiberPlanPipeManufacturer", ["signed" => true]);
$table->addColumn("name", "string", ["null" => false]);
$table->addColumn("colors", "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("FiberPlanPipeManufacturer")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Phinx\Migration\AbstractMigration;
final class FiberPlanPipeTemplate extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("FiberPlanPipeTemplate", ["signed" => true]);
$table->addColumn("fiberPlanPipeManufacturer_id", "integer", ["null" => false]);
$table->addColumn("pipe7x4", "integer", ["null" => true]);
$table->addColumn("pipe14x10", "integer", ["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("FiberPlanPipeTemplate")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}

View File

@@ -0,0 +1,36 @@
<?php
use Phinx\Migration\AbstractMigration;
final class FiberPlanPipeEndpoint extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("FiberPlanPipeEndpoint", ["signed" => true]);
$table->addColumn("fiberPlanPipe_id", "integer", ["null" => false]);
$table->addColumn("pop_id", "integer", ["null" => true]);
$table->addColumn("fiberPlanDispatcher_id", "integer", ["null" => true]);
$table->addColumn("building_id", "integer", ["null" => true]);
$table->addColumn("sort", "integer", ["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("FiberPlanPipeEndpoint")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}

View File

@@ -0,0 +1,19 @@
<?php /** @noinspection ALL */
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AddVoiceCallHistoryStartIndex extends AbstractMigration {
public function up(): void {
if ($this->getEnvironment() == "thetool") {
//VoiceCallHistory Table add start index
$this->table("VoiceCallHistory")->addIndex(["start"])->save();
}
}
public function down(): void {
if ($this->getEnvironment() == "thetool") {
$this->table("VoiceCallHistory")->removeIndex(["start"])->save();
}
}
}