You are here

function db_maintenance_uninstall in DB Maintenance 7

Same name and namespace in other branches
  1. 8.2 db_maintenance.install \db_maintenance_uninstall()
  2. 6 db_maintenance.install \db_maintenance_uninstall()
  3. 7.2 db_maintenance.install \db_maintenance_uninstall()

Implements hook_uninstall().

File

./db_maintenance.install, line 11
Installation file for DB Maintenance.

Code

function db_maintenance_uninstall() {

  // Delete individual configuration options.
  variable_del('db_maintenance_cron_last');
  variable_del('db_maintenance_cron_frequency');
  variable_del('db_maintenance_log');
  variable_del('db_maintenance_all_tables');

  // Delete the list of tables for each DB.
  $result = db_query("\n    SELECT name FROM {variable}\n    WHERE name LIKE 'db_maintenance_table_list_%'\n  ");
  foreach ($result as $row) {
    variable_del($row->name);
  }
}