diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 292882776a..2b1a2a59b3 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1447,13 +1447,3 @@ function system_update_8901() { } } } - -/** - * Drop the 'all' index on the 'key_value_expire' table. - */ -function system_post_update_9201() { - $schema = \Drupal::database()->schema(); - if ($schema->tableExists('key_value_expire')) { - $schema->dropIndex('key_value_expire', 'all'); - } -} diff --git a/core/modules/system/system.post_update.php b/core/modules/system/system.post_update.php index 14391c15e9..6d09e99c0b 100644 --- a/core/modules/system/system.post_update.php +++ b/core/modules/system/system.post_update.php @@ -179,3 +179,13 @@ function system_post_update_delete_rss_settings() { ->clear('langcode') ->save(); } + +/** + * Drop the 'all' index on the 'key_value_expire' table. + */ +function system_post_update_remove_key_value_expire_all_index() { + $schema = \Drupal::database()->schema(); + if ($schema->tableExists('key_value_expire')) { + $schema->dropIndex('key_value_expire', 'all'); + } +} diff --git a/core/modules/system/tests/src/Functional/Update/DropIndexAllOnKeyValueExpireTableUpdateTest.php b/core/modules/system/tests/src/Functional/Update/DropIndexAllOnKeyValueExpireTableUpdateTest.php index 847016b6e9..1fe071ba34 100644 --- a/core/modules/system/tests/src/Functional/Update/DropIndexAllOnKeyValueExpireTableUpdateTest.php +++ b/core/modules/system/tests/src/Functional/Update/DropIndexAllOnKeyValueExpireTableUpdateTest.php @@ -8,7 +8,7 @@ * Tests that 'all' index is dropped from the 'key_value_expire' table. * * @group Update - * @see system_post_update_9201 + * @see system_post_update_remove_key_value_expire_all_index() */ class DropIndexAllOnKeyValueExpireTableUpdateTest extends UpdatePathTestBase {