45 lines
1.7 KiB
PHP
45 lines
1.7 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class AddressLinkAddCommercialcontact extends AbstractMigration
|
|
{
|
|
public function up(): void
|
|
{
|
|
if($this->getEnvironment() == "thetool") {
|
|
$addresslink = $this->table("AddressLink");
|
|
$addresslink->changeColumn("type", "enum", ["null" => false, "values" => "billing,employee,customer,contact,techcontact,commercialcontact"]);
|
|
$addresslink->update();
|
|
|
|
$addresstype = $this->table("Addresstype");
|
|
$addresstype->changeColumn("type", "enum", ["null" => false, "values" => "systemowner,productowner,netowner,salespartner,pipeworker,lineworker,pipeplanner,lineplanner,netoperator,supplier,billing,employee,customer,contact,techcontact,commercialcontact"]);
|
|
$addresstype->save();
|
|
|
|
|
|
}
|
|
|
|
if($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
if($this->getEnvironment() == "thetool") {
|
|
|
|
$addresstype = $this->table("Addresstype");
|
|
$addresstype->changeColumn("type", "enum", ["null" => false, "values" => "systemowner,productowner,netowner,salespartner,pipeworker,lineworker,pipeplanner,lineplanner,netoperator,supplier,billing,employee,customer,contact,techcontact"]);
|
|
$addresstype->save();
|
|
|
|
$addresslink = $this->table("AddressLink");
|
|
$addresslink->changeColumn("type", "enum", ["null" => false, "values" => "billing,employee,customer,contact,techcontact"]);
|
|
$addresslink->update();
|
|
}
|
|
|
|
if($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
}
|