47 lines
2.2 KiB
PHP
47 lines
2.2 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class CreatePreorderBillingCustomer extends AbstractMigration
|
|
{
|
|
public function up(): void
|
|
{
|
|
if($this->getEnvironment() == "thetool") {
|
|
$table = $this->table('PreorderBillingCustomer');
|
|
$table->addColumn("netowner_id", "string", ["limit" => 255, "null" => true, "default" => null]);
|
|
$table->addColumn("fibu_account_number", "string", ["limit" => 255, "null" => true, "default" => null]);
|
|
$table->addColumn("company", "string", ["limit" => 255, "null" => true, "default" => null]);
|
|
$table->addColumn("firstname", "string", ["limit" => 255, "null" => true, "default" => null]);
|
|
$table->addColumn("lastname", "string", ["limit" => 255, "null" => true, "default" => null]);
|
|
$table->addColumn("street", "string", ["limit" => 255, "null" => true, "default" => null]);
|
|
$table->addColumn("zip", "string", ["limit" => 255, "null" => true, "default" => null]);
|
|
$table->addColumn("city", "string", ["limit" => 255, "null" => true, "default" => null]);
|
|
$table->addColumn("country", "string", ["limit" => 255, "null" => true, "default" => null]);
|
|
$table->addColumn("phone", "string", ["limit" => 255, "null" => true, "default" => null]);
|
|
$table->addColumn("email", "string", ["limit" => 255, "null" => true, "default" => null]);
|
|
$table->addColumn("uid", "string", ["limit" => 255, "null" => true, "default" => null]);
|
|
$table->addColumn("create_by", "integer", ["null" => false]);
|
|
$table->addColumn("edit_by", "integer", ["null" => false]);
|
|
$table->addColumn("create", "integer", ["null" => false]);
|
|
$table->addColumn("edit", "integer", ["null" => false]);
|
|
$table->create();
|
|
}
|
|
|
|
if($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
if($this->getEnvironment() == "thetool") {
|
|
$this->table('PreorderBillingCustomer')->drop()->save();
|
|
}
|
|
|
|
if($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
}
|