49 lines
2.0 KiB
PHP
49 lines
2.0 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class CreateBillingVoicenumber extends AbstractMigration
|
|
{
|
|
public function up(): void
|
|
{
|
|
if($this->getEnvironment() == "thetool") {
|
|
$table = $this->table("BillingVoicenumber");
|
|
$table->addColumn("billing_id", "integer", ["null" => true, "default" => null]);
|
|
$table->addColumn("contract_id", "integer", ["null" => false]);
|
|
$table->addColumn("voicenumber", "string", ["null" => false, "limit" => 64]);
|
|
$table->addColumn("start_date", "date", ["null" => false]);
|
|
$table->addColumn("end_date", "date", ["null" => false]);
|
|
$table->addColumn("voiceplan", "string", ["null" => false, "limit" => 255]);
|
|
$table->addColumn("zone", "string", ["null" => false, "limit" => 64]);
|
|
$table->addColumn("call_count", "integer", ["null" => false]);
|
|
$table->addColumn("duration", "integer", ["null" => false]);
|
|
$table->addColumn("price", "decimal", ["null" => false, "precision" => 14, "scale" => 8]);
|
|
$table->addColumn("price_total", "decimal", ["null" => false, "precision" => 14, "scale" => 4]);
|
|
$table->addColumn("increment", "integer", ["null" => false]);
|
|
$table->addColumn("increment_first", "integer", ["null" => false]);
|
|
$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("BillingVoicenumber")->drop()->save();
|
|
}
|
|
|
|
if($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
}
|