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

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pull/52414/head
Christoph Wurst 2025-03-12 13:08:58 +07:00 committed by backportbot[bot]
parent c05d7b984d
commit a819f910b3
2 changed files with 9 additions and 6 deletions

@ -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;
}

@ -151,12 +151,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(