ADB Rimo Impot: Added creation of Sbidi Preorders
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class CreateSbidiOrder extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("SbidiOrder");
|
||||
|
||||
$table->addColumn("name", "string", ["limit" => 64, "null" => true]);
|
||||
$table->addColumn("building_rimo_id", "string", ["limit" => 64, "null" => true]);
|
||||
$table->addColumn("home_rimo_id", "string", ["limit" => 64, "null" => true]);
|
||||
$table->addColumn("workorder_rimo_id", "string", ["limit" => 64, "null" => true]);
|
||||
$table->addColumn("order_date", "datetime", ["null" => true]);
|
||||
$table->addColumn("building_type", "string", ["limit" => 64, "null" => true]); // SD/MD
|
||||
$table->addColumn("uid", "string", ["limit" => 64, "null" => true]);
|
||||
$table->addColumn("firstname", "string", ["limit" => 255, "null" => true]);
|
||||
$table->addColumn("lastname", "string", ["limit" => 255, "null" => true]);
|
||||
$table->addColumn("phone", "string", ["limit" => 255, "null" => true]);
|
||||
$table->addColumn("address", "string", ["limit" => 255, "null" => true]);
|
||||
$table->addColumn("zip", "string", ["limit" => 255, "null" => true]);
|
||||
$table->addColumn("city", "string", ["limit" => 255, "null" => true]);
|
||||
$table->addColumn("country", "string", ["limit" => 255, "null" => true]);
|
||||
$table->addColumn("email", "string", ["limit" => 255, "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("SbidiOrder")->drop()->save();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user