Preorder: Status can now be changed manually
This commit is contained in:
@@ -28,6 +28,17 @@ final class AddVoiceplanZone extends AbstractMigration
|
||||
$table->removeColumn("increment");
|
||||
$table->renameColumn("voiceplan_id", "voiceplanzone_id");
|
||||
$table->update();
|
||||
|
||||
$table = $this->table("VoiceplanFile");
|
||||
$table->addColumn("voiceplan_id", "integer", ["null" => false]);
|
||||
$table->addColumn("file_id", "integer", ["null" => false]);
|
||||
$table->addColumn("name", "string", ["null" => false, "limit" => 255]);
|
||||
$table->addColumn("description", "text", ["null" => true, "default" => null]);
|
||||
$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->create();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
@@ -38,6 +49,8 @@ final class AddVoiceplanZone extends AbstractMigration
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$this->table("VoiceplanFile")->drop()->save();
|
||||
|
||||
$table = $this->table("Voiceplandestination");
|
||||
$table->renameColumn("voiceplanzone_id", "voiceplan_id");
|
||||
$table->addColumn("purchase_price", "decimal", ["null" => false, "precision" => 14, "scale" => 4]);
|
||||
|
||||
@@ -23,9 +23,9 @@ final class AddContractTables extends AbstractMigration
|
||||
$contract->addColumn("product_external", "integer", ["null" => false, "default" => 0, "limit" => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY]);
|
||||
$contract->addColumn("product_external_id", "integer", ["null" => true, "default" => null]);
|
||||
$contract->addColumn("price", "decimal", ["null" => false, "precision" => 14, "scale" => 4]);
|
||||
$contract->addColumn("price_setup", "decimal", ["null" => false, "precision" => 14, "scale" => 4]);
|
||||
$contract->addColumn("price_nne", "decimal", ["null" => false, "default" => null, "precision" => 14, "scale" => 4]);
|
||||
$contract->addColumn("price_nbe", "decimal", ["null" => false, "default" => null, "precision" => 14, "scale" => 4]);
|
||||
$contract->addColumn("price_setup", "decimal", ["null" => false, "default" => 0, "precision" => 14, "scale" => 4]);
|
||||
$contract->addColumn("price_nne", "decimal", ["null" => false, "default" => 0, "precision" => 14, "scale" => 4]);
|
||||
$contract->addColumn("price_nbe", "decimal", ["null" => false, "default" => 0, "precision" => 14, "scale" => 4]);
|
||||
$contract->addColumn("billing_delay", "integer", ["null" => false, "default" => 0]);
|
||||
$contract->addColumn("billing_period", "integer", ["null" => false, "default" => 1]);
|
||||
$contract->addColumn("order_date", "integer", ["null" => true, "default" => null]);
|
||||
@@ -102,7 +102,7 @@ final class AddContractTables extends AbstractMigration
|
||||
$cj = $this->table("Contractjournal");
|
||||
$cj->addColumn("contract_id", "integer", ["null" => false]);
|
||||
$cj->addColumn("type", "string", ["null" => false, "limit" => 64]);
|
||||
$cj->addColumn("string", "string", ["null" => true, "default" => null, "limit" => 64]);
|
||||
$cj->addColumn("value", "string", ["null" => true, "default" => null, "limit" => 64]);
|
||||
$cj->addColumn("text", "text", ["null" => true, "default" => null]);
|
||||
$cj->addColumn("create_by", "integer", ["null" => false]);
|
||||
$cj->addColumn("edit_by", "integer", ["null" => false]);
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class PreorderAddCifToken extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("Preorder");
|
||||
$table->addColumn("ciftoken", "string", ["null" => true, "default" => null, "limit" => 64, "after" => "ucode"]);
|
||||
$table->addColumn("cifurl", "string", ["null" => true, "default" => null, "limit" => 255, "after" => "ciftoken"]);
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("Preorder");
|
||||
$table->removeColumn("cifurl");
|
||||
$table->removeColumn("ciftoken");
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user