43 lines
1.3 KiB
PHP
43 lines
1.3 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class CreatePreorderCitycomOan extends AbstractMigration
|
|
{
|
|
public function up(): void
|
|
{
|
|
if($this->getEnvironment() == "thetool") {
|
|
$table = $this->table("PreorderCitycomOan");
|
|
$table->addColumn("preorder_id", "integer", ["null" => false]);
|
|
$table->addColumn("ont_id", "string", ["null" => true]);
|
|
$table->addColumn("ont_sn", "string", ["null" => true]);
|
|
$table->addColumn("ont_gpid", "string", ["null" => true]);
|
|
$table->addColumn("ont_mac", "string", ["null" => true]);
|
|
|
|
$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("PreorderCitycomOan")->drop()->save();
|
|
}
|
|
|
|
if($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
}
|