36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class PreorderBillingAddCustomerId extends AbstractMigration
|
|
{
|
|
public function up(): void
|
|
{
|
|
if($this->getEnvironment() == "thetool") {
|
|
$table = $this->table('PreorderBilling');
|
|
$table->addColumn("preorderbillingcustomer_id", "integer", ["null" => true, "default" => null, "after" => "end_date"]);
|
|
$table->changeColumn("owner_id", "integer", ["null" => true, "default" => null]);
|
|
$table->changeColumn("billingaddress_id", "integer", ["null" => true, "default" => null]);
|
|
$table->update();
|
|
}
|
|
|
|
if($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
if($this->getEnvironment() == "thetool") {
|
|
$table = $this->table('PreorderBilling');
|
|
$table->removeColumn("preorderbillingcustomer_id");
|
|
$table->update();
|
|
}
|
|
|
|
if($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
}
|