WIP PreorderBilling 2025-03-26
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class AdbWohneinheitAddEnduserSetupInvoiceDate extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
$table = $this->table("Wohneinheit");
|
||||
$table->addColumn("enduser_setup_invoice_date", "date", ["null" => true, "default" => null, "after" => "nutzung"]);
|
||||
$table->update();
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
$table = $this->table("Wohneinheit");
|
||||
$table->removeColumn("enduser_setup_invoice_date");
|
||||
$table->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class PreorderBillingAddProductType extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$billing = $this->table("PreorderBilling");
|
||||
$billing->addColumn("product_type", "string", ["limit" => 64, "null" => true, "after" => "product_id"]);
|
||||
$billing->save();
|
||||
|
||||
$ip = $this->table("PreorderBillingInvoiceposition");
|
||||
$ip->addColumn("product_type", "string", ["limit" => 64, "null" => true, "after" => "product_id"]);
|
||||
$ip->save();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$billing = $this->table("PreorderBilling");
|
||||
$billing->removeColumn("product_type");
|
||||
$billing->save();
|
||||
|
||||
$invoice = $this->table("PreorderBillingInvoiceposition");
|
||||
$invoice->removeColumn("product_type");
|
||||
$invoice->save();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user