WIP Address BMD Export

This commit is contained in:
Frank Schubert
2024-01-05 13:56:02 +01:00
parent 60f0461f79
commit 7646345779
11 changed files with 308 additions and 9 deletions
@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AddressAddFibuSupplierDue extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Address");
$table->addColumn("fibu_supplier_due", "integer", ["null" => true, "default" => null, "after" => "fibu_supplier_number"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Address");
$table->removeColumn("fibu_supplier_due");
$table->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}
@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateSystemTable extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("System");
$table->addColumn("active", "integer", ["null" => false, "default" => 1, "limit" => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY]);
$table->addColumn("name", "string", ["null" => false, "limit" => 255]);
$table->addColumn("value", "string", ["null" => false, "limit" => 1024]);
$table->addColumn("type", "enum", ["null" => false, "values" => 'int,float,string,json']);
$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("System")->drop();
}
if($this->getEnvironment() == "addressdb") {
}
}
}