Add price type selection modal and backend functionality for addresses

This commit is contained in:
2025-12-02 07:35:26 +01:00
parent 62b0381db7
commit d328f1791c
5 changed files with 192 additions and 2 deletions

View File

@@ -0,0 +1,33 @@
<?php
use Phinx\Migration\AbstractMigration;
final class AddAddressPriceType extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("AddressPriceType", ["signed" => true]);
$table->addColumn("address_id", "integer", ["null" => false]);
$table->addColumn("priceType_id", "integer", ["null" => false]);
$table->addColumn("create", "integer", ["null" => false]);
$table->addColumn("createBy", "integer", ["null" => false]);
$table->addIndex("address_id", ["unique" => true]);
$table->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table("AddressPriceType")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}
?>