Add price type selection modal and backend functionality for addresses
This commit is contained in:
33
db/migrations/20251202071102_add_address_price_type.php
Normal file
33
db/migrations/20251202071102_add_address_price_type.php
Normal 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") {
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user