diff --git a/apps/dav/lib/Migration/Version1004Date20170924124212.php b/apps/dav/lib/Migration/Version1004Date20170924124212.php index a8b85469214dc..fbfec7e8e2dc8 100644 --- a/apps/dav/lib/Migration/Version1004Date20170924124212.php +++ b/apps/dav/lib/Migration/Version1004Date20170924124212.php @@ -28,7 +28,10 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op $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; } diff --git a/core/Application.php b/core/Application.php index d2bcb18bafb3e..34e798a22bf5b 100644 --- a/core/Application.php +++ b/core/Application.php @@ -151,12 +151,12 @@ public function __construct() { 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(