added rml unscheduled check
This commit is contained in:
42
db/migrations/20250612124000_add_new_indexes_adb.php
Normal file
42
db/migrations/20250612124000_add_new_indexes_adb.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php /** @noinspection ALL */
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class AddNewIndexesAdb extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
$wohneinheit = $this->table("Wohneinheit");
|
||||
$wohneinheit->removeIndexByName('oaid')
|
||||
->addIndex('oaid', ['name' => 'idx_oaid_full'])
|
||||
->save();
|
||||
|
||||
$wohneinheit->removeIndexByName('extref')
|
||||
->addIndex('extref', ['name' => 'idx_extref_full'])
|
||||
->save();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
$wohneinheit = $this->table("Wohneinheit");
|
||||
$wohneinheit->removeIndexByName('idx_oaid_full')
|
||||
->addIndex('oaid', [
|
||||
'name' => 'oaid',
|
||||
'limit' => 10
|
||||
])
|
||||
->save();
|
||||
|
||||
$wohneinheit->removeIndexByName('idx_extref_full')
|
||||
->addIndex('extref', [
|
||||
'name' => 'extref',
|
||||
'limit' => 10
|
||||
])
|
||||
->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
35
db/migrations/20250612124000_add_new_indexes_thetool.php
Normal file
35
db/migrations/20250612124000_add_new_indexes_thetool.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php /** @noinspection ALL */
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class AddNewIndexesThetool extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$workerPermission = $this->table("WorkerPermission");
|
||||
$workerPermission->addColumn("canADBExtended", "enum", ["null" => false, "values" => 'false,true', "default" => "false", "after" => "canSuperexpert"])
|
||||
->update();
|
||||
|
||||
$network = $this->table("Network");
|
||||
$network->addIndex('adb_netzgebiet_id', ['name' => 'idx_adb_netzgebiet_id'])
|
||||
->addIndex('owner_id', ['name' => 'idx_owner_id'])
|
||||
->save();
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$workerPermission = $this->table("WorkerPermission");
|
||||
$workerPermission->removeColumn("canADBExtended")
|
||||
->save();
|
||||
|
||||
$network = $this->table("Network");
|
||||
$network->removeIndexByName('idx_adb_netzgebiet_id')
|
||||
->removeIndexByName('idx_owner_id')
|
||||
->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user