diff --git a/composer.json b/composer.json index c9e785219..1c8545d1b 100644 --- a/composer.json +++ b/composer.json @@ -122,9 +122,6 @@ "drupal/autologout": { "Modal related issues": "https://www.drupal.org/files/issues/2023-04-25/autologout.2023-04-25.patch" }, - "drupal/search_api": { - "Primary key fix": "patches/search_api_primary_key.patch" - }, "drupal/crop": { "Fix encoded paths for files": "patches/AU-2225-fix-encoded-paths.patch" } diff --git a/patches/search_api_primary_key.patch b/patches/search_api_primary_key.patch deleted file mode 100644 index 89aa0fedd..000000000 --- a/patches/search_api_primary_key.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/modules/search_api_db/src/Plugin/search_api/backend/Database.php b/modules/search_api_db/src/Plugin/search_api/backend/Database.php -index 223d69ad..25aabf1b 100644 ---- a/modules/search_api_db/src/Plugin/search_api/backend/Database.php -+++ b/modules/search_api_db/src/Plugin/search_api/backend/Database.php -@@ -850,12 +850,9 @@ class Database extends BackendPluginBase implements AutocompleteBackendInterface - 'not null' => TRUE, - ], - ], -+ 'primary key' => ['item_id'] - ]; -- // For the denormalized index table, add a primary key right away. For -- // newly created field tables we first need to add the "value" column. -- if ($type === 'index') { -- $table['primary key'] = ['item_id']; -- } -+ - $this->database->schema()->createTable($db['table'], $table); - $this->dbmsCompatibility->alterNewTable($db['table'], $type); - } -@@ -920,7 +917,8 @@ class Database extends BackendPluginBase implements AutocompleteBackendInterface - - // Add a covering index for field tables. - if ($new_table && $type == 'field') { -- $this->database->schema()->addPrimaryKey($db['table'], ['item_id', $column]); -+ $sql = "ALTER TABLE `{$table['name']}` DROP PRIMARY KEY, ADD PRIMARY KEY ( `item_id`, `{$column}` )"; -+ $this->database->query($sql); - } - } -