function multiversion_uninstall in Multiversion 8
Same name and namespace in other branches
- 8.2 multiversion.install \multiversion_uninstall()
Implements hook_uninstall().
File
- ./
multiversion.install, line 50
Code
function multiversion_uninstall() {
\Drupal::state()
->delete('multiversion_enabled');
// When the module is being uninstalled, we need to signal
// multiversion_field_info_alter() not to alter the field type classes
// anymore, so we ca properly update UUID fields.
\Drupal::state()
->set('multiversion_uninstalling', TRUE);
_multiversion_update_uuid_fields();
\Drupal::state()
->delete('multiversion_uninstalling');
$database = \Drupal::database();
$schema = $database
->schema();
$table = 'url_alias';
$field = 'workspace';
if ($schema
->fieldExists($table, $field)) {
$schema
->dropField($table, $field);
}
}