52 lines
2.0 KiB
PHP
52 lines
2.0 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class CallcenterIdentity extends AbstractMigration
|
|
{
|
|
public function up(): void
|
|
{
|
|
if($this->getEnvironment() == "thetool") {
|
|
$ci = $this->table("CallcenterIdentity");
|
|
$ci->addColumn("name", "string", ["null" => false, "length" => 64]);
|
|
$ci->addColumn("order", "integer", ["null" => true]);
|
|
$ci->addColumn("number", "string", ["null" => false, "length" => 64]);
|
|
$ci->addColumn("display", "string", ["null" => false, "length" => 64]);
|
|
$ci->addColumn("color", "string", ["null" => false, "length" => 64]);
|
|
$ci->addColumn("create_by", "integer", ["null" => false]);
|
|
$ci->addColumn("edit_by", "integer", ["null" => false]);
|
|
$ci->addColumn("create", "integer", ["null" => false]);
|
|
$ci->addColumn("edit", "integer", ["null" => false]);
|
|
$ci->create();
|
|
|
|
$ciin = $this->table("CallcenterIdentityIncomingnumber");
|
|
$ciin->addColumn("callcenteridentity_id", "integer", ["null" => false]);
|
|
$ciin->addColumn("number", "string", ["null" => false, "length" => 64]);
|
|
$ciin->addColumn("display", "string", ["null" => false, "length" => 64]);
|
|
$ciin->addColumn("create_by", "integer", ["null" => false]);
|
|
$ciin->addColumn("edit_by", "integer", ["null" => false]);
|
|
$ciin->addColumn("create", "integer", ["null" => false]);
|
|
$ciin->addColumn("edit", "integer", ["null" => false]);
|
|
$ciin->create();
|
|
|
|
}
|
|
|
|
if($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
if($this->getEnvironment() == "thetool") {
|
|
$this->table("CallcenterIdentityIncomingnumber")->drop()->save();
|
|
$this->table("CallcenterIdentity")->drop()->save();
|
|
}
|
|
|
|
if($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
}
|