Updated preorder api

This commit is contained in:
Frank Schubert
2023-11-09 14:55:10 +01:00
parent 36c6036ed9
commit 19cd396175
9 changed files with 137 additions and 21 deletions
@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class PreorderAddInstallationAndOrderDates extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Preorder");
$table->addColumn("installation_date", "integer", ["null" => true, "default" => null, "after" => "submit_request"]);
$table->addColumn("order_date", "integer", ["null" => true, "default" => null, "after" => "note"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("Preorder")->removeColumn("installation_date")->save();
$this->table("Preorder")->removeColumn("order_date")->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}