25 lines
1021 B
PHP
25 lines
1021 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class CreateManualInvoiceJournal extends AbstractMigration
|
|
{
|
|
public function change(): void
|
|
{
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$table = $this->table('ManualInvoiceJournal');
|
|
$table->addColumn('manualinvoiceId', 'integer', ['signed' => false])
|
|
->addColumn('text', 'text', ['null' => true])
|
|
->addColumn('data', 'json', ['null' => true])
|
|
->addColumn('statusChange', 'string', ['limit' => 255, 'null' => true])
|
|
->addColumn('fileIds', 'json', ['null' => true])
|
|
->addColumn('createBy', 'integer', ['signed' => false])
|
|
->addColumn('create', 'integer')
|
|
->addForeignKey('manualinvoiceId', 'ManualInvoice', 'id', ['delete' => 'CASCADE', 'update' => 'CASCADE'])
|
|
->addIndex(['manualinvoiceId'], ['name' => 'manualinvoiceId_idx'])
|
|
->create();
|
|
}
|
|
}
|
|
}
|