Forked from mecmartini/drupal-fix-module-has-an-entry-in-the-system-schema.php
Created
April 20, 2022 21:38
-
-
Save jcicero518/83935a7cc766075a4b0da2aefa83cd96 to your computer and use it in GitHub Desktop.
Drupal: fix module has an entry in the system.schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Removing traces of the test_marco_socialfood_workflow module after merging. | |
| */ | |
| function hook_update_N() { | |
| $schema_store = \Drupal::keyValue('system.schema'); | |
| $schema_store->delete('module_name'); | |
| \Drupal::database()->delete('key_value') | |
| ->condition('collection', 'system.schema') | |
| ->condition('name', 'module_name') | |
| ->execute(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment