added new adb dashboard

This commit is contained in:
Luca Haid
2025-05-13 11:41:39 +02:00
parent a6d577023f
commit 11ebed70a7
5 changed files with 453 additions and 20 deletions
@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class HausnummerAddIndexes extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "addressdb") {
$table = $this->table("Hausnummer");
$table->addIndex("rimo_type", ["name" => "idx_rimo_type"]);
$table->addIndex("rimo_op_state", ["name" => "idx_rimo_op_state"]);
$table->addIndex(["rimo_type", "rimo_op_state"], ["name" => "idx_combined_type_state"]);
$table->update();
}
}
public function down(): void
{
if($this->getEnvironment() == "addressdb") {
$table = $this->table("Hausnummer");
$table->removeIndex(["rimo_type"], ["name" => "idx_rimo_type"]);
$table->removeIndex(["rimo_op_state"], ["name" => "idx_rimo_op_state"]);
$table->removeIndex(["rimo_type", "rimo_op_state"], ["name" => "idx_combined_type_state"]);
$table->update();
}
}
}