0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-05-09 00:00:43 +00:00

Merge pull request from nextcloud/perf/db/cards-properties-abid-name-value-idx

perf(db): Extend index on cards_properties to cover name and value
This commit is contained in:
Daniel 2025-04-24 13:33:37 +02:00 committed by GitHub
commit cc5ca58816
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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(