Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mecmartini/1fd44775358c27b6768cdbbf26e92c1c to your computer and use it in GitHub Desktop.
Save mecmartini/1fd44775358c27b6768cdbbf26e92c1c to your computer and use it in GitHub Desktop.
Drupal: fix module has an entry in the system.schema
<?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