perf(db): Extend index on cards_properties to cover name and value

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2025-03-12 13:08:58 +01:00
parent 5741d587ff
commit 8388646ae7
No known key found for this signature in database
GPG key ID: CC42AC2A7F0E56D8
2 changed files with 9 additions and 6 deletions

View file

@ -28,7 +28,10 @@ class Version1004Date20170924124212 extends SimpleMigrationStep {
$table->addIndex(['addressbookid', 'uri'], 'cards_abiduri');
$table = $schema->getTable('cards_properties');
$table->addIndex(['addressbookid'], 'cards_prop_abid');
// Removed later on
// $table->addIndex(['addressbookid'], 'cards_prop_abid');
// Added later on
$table->addIndex(['addressbookid', 'name', 'value'], 'cards_prop_abid_name_value', );
return $schema;
}

View file

@ -147,12 +147,12 @@ class Application extends App {
true
);
$event->addMissingIndex(
$event->replaceIndex(
'cards_properties',
'cards_prop_abid',
['addressbookid'],
[],
true
['cards_prop_abid'],
'cards_prop_abid_name_value',
['addressbookid', 'name', 'value'],
false,
);
$event->addMissingIndex(