41 lines
1.3 KiB
PHP
41 lines
1.3 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class CreatePreorderBillingInvoiceFile extends AbstractMigration
|
|
{
|
|
public function up(): void
|
|
{
|
|
if($this->getEnvironment() == "thetool") {
|
|
$table = $this->table("PreorderBillingInvoiceFile");
|
|
$table->addColumn("invoice_id", "integer", ["null" => false]);
|
|
$table->addColumn("file_id", "integer", ["null" => false]);
|
|
$table->addColumn("name", "string", ["null" => false, "limit" => 1024]);
|
|
$table->addColumn("description", "string", ["null" => true, "default" => null, "limit" => 1024]);
|
|
|
|
$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("PreorderBillingInvoiceFile")->drop()->save();
|
|
}
|
|
|
|
if($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
}
|