Files
thetool/db/migrations/20250226154252_addressdb_create_gwrgst.php
2025-02-27 17:58:57 +01:00

48 lines
2.0 KiB
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AddressdbCreateGwrgst extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
}
if($this->getEnvironment() == "addressdb") {
$table = $this->table('Gwrgst');
$table->addColumn("kgnr", "integer", ["null" => false])
->addColumn("gstnr", "string", ["limit" => 255, "null" => true, "default" => null])
->addColumn("g", "string", ["limit" => 255, "null" => true, "default" => null])
->addColumn("ba", "string", ["limit" => 255, "null" => true, "default" => null])
->addColumn("nu", "string", ["limit" => 255, "null" => true, "default" => null])
->addColumn("tind", "string", ["limit" => 255, "null" => true, "default" => null])
->addColumn("ind", "string", ["limit" => 255, "null" => true, "default" => null])
->addColumn("flaeche", "string", ["limit" => 255, "null" => true, "default" => null])
->addColumn("emz", "string", ["limit" => 255, "null" => true, "default" => null])
->addColumn("gfn", "string", ["limit" => 255, "null" => true, "default" => null])
->addColumn("gft", "string", ["limit" => 255, "null" => true, "default" => null])
->addColumn("kgez", "string", ["limit" => 255, "null" => true, "default" => null])
->addColumn("ez", "string", ["limit" => 255, "null" => true, "default" => null])
->addColumn("create", "integer", ["null" => false])
->addColumn("edit", "integer", ["null" => false])
->create();
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
}
if($this->getEnvironment() == "addressdb") {
$this->table("Gwrgst")->drop()->save();
}
}
}