WIP 2025-01-20 ConstructionConsent History
This commit is contained in:
@@ -60,9 +60,12 @@ $pagination_entity_name = "Adressen";
|
||||
<?=$item->adb_hausnummer->strasse->gemeinde->name?>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<th>Anzahl Bestellungen</th>
|
||||
<td><?=$item->preorder_count?></td>
|
||||
</tr>
|
||||
<th>Anzahl Wohneinheiten</th>
|
||||
<td><?=$item->adb_hausnummer->unit_count?></td>
|
||||
</tr><tr>
|
||||
<th>Anzahl Bestellungen</th>
|
||||
<td><?=$item->preorder_count?></td>
|
||||
</tr>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<th>Straße</th>
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class CreateConstructionConsentHistoryAndContact extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$cch = $this->table("ConstructionConsentHistory");
|
||||
$cch->addColumn("constructionconsent_id", "integer", ["null" => false])
|
||||
->addColumn("key", "string", ["null" => false, "limit" => 100])
|
||||
->addColumn("old_value", "text", ["null" => true])
|
||||
->addColumn("new_value", "text", ["null" => true])
|
||||
->addColumn("create_by", "integer", ["null" => false])
|
||||
->addColumn("edit_by", "integer", ["null" => false])
|
||||
->addColumn("create", "integer", ["null" => false])
|
||||
->addColumn("edit", "integer", ["null" => false]);
|
||||
$cch->create();
|
||||
|
||||
$ccc = $this->table("ConstructionConsentContact");
|
||||
$ccc->addColumn("constructionconsent_id", "integer", ["null" => false])
|
||||
->addColumn("type", "enum", ["null" => false, "values" => ["contact", "property_manager", "electrician", "other"]])
|
||||
->addColumn("name", "string", ["null" => true, "default" => null, "limit" => "255"])
|
||||
->addColumn("street", "string", ["null" => true, "default" => null, "limit" => "64"])
|
||||
->addColumn("zip", "string", ["null" => true, "default" => null, "limit" => "32"])
|
||||
->addColumn("city", "string", ["null" => true, "default" => null, "limit" => "64"])
|
||||
->addColumn("country", "string", ["null" => true, "default" => null, "limit" => "64"])
|
||||
->addColumn("phone", "string", ["null" => true, "default" => null, "limit" => "64"])
|
||||
->addColumn("fax", "string", ["null" => true, "default" => null, "limit" => "64"])
|
||||
->addColumn("email", "string", ["null" => true, "default" => null, "limit" => "64"])
|
||||
->addColumn("create_by", "integer", ["null" => false])
|
||||
->addColumn("edit_by", "integer", ["null" => false])
|
||||
->addColumn("create", "integer", ["null" => false])
|
||||
->addColumn("edit", "integer", ["null" => false]);
|
||||
$ccc->create();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user