Added InvoiceJob

This commit is contained in:
Frank Schubert
2024-08-29 14:51:37 +02:00
parent 248013423d
commit 1ed2dddb97
13 changed files with 1051 additions and 30 deletions
@@ -0,0 +1,43 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateInvoiceJob extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("InvoiceJob");
$table->addColumn("task", "string", ["null" => false, "limit" => 64]);
$table->addColumn("from_date", "date", ["null" => false]);
$table->addColumn("to_date", "date", ["null" => false]);
$table->addColumn("started", "datetime", ["null" => true, "default" => null]);
$table->addColumn("finished", "datetime", ["null" => true, "default" => null]);
$table->addColumn("status", "string", ["null" => true, "default" => true, "limit" => 64]);
$table->addColumn("result", "json", ["null" => true, "default" => null]);
$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->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("InvoiceJob")->drop()->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}