You are here

function custom_breadcrumbs_features_uninstall in Custom Breadcrumbs Features 7.2

Implements hook_uninstall().

Remove machine_name field from all installed breadcrumb tables.

File

./custom_breadcrumbs_features.install, line 113
Install file for custom_breadcrumbs_features.

Code

function custom_breadcrumbs_features_uninstall() {

  // Load .module so we can retrieve types.
  drupal_load('module', 'custom_breadcrumbs_features');
  $tables = array_keys(_custom_breadcrumbs_features_get_types());

  // Keep only tables installed.
  $tables = array_filter($tables, 'db_table_exists');

  // Remove field machine_name.
  foreach ($tables as $table) {
    db_drop_field($table, 'machine_name');
    db_drop_unique_key($table, 'machine_name');
  }
}