You are here

db_maintenance.install in DB Maintenance 8.2

Installation file for DB Maintenance.

File

db_maintenance.install
View source
<?php

/**
 * @file
 * Installation file for DB Maintenance.
 */

/**
 * Implements hook_uninstall().
 */
function db_maintenance_uninstall() {

  // Delete individual configuration options.
  \Drupal::config('db_maintenance.settings')
    ->clear('db_maintenance_cron_last')
    ->save();
  \Drupal::config('db_maintenance.settings')
    ->clear('db_maintenance_cron_frequency')
    ->save();
  \Drupal::config('db_maintenance.settings')
    ->clear('db_maintenance_log')
    ->save();
  \Drupal::config('db_maintenance.settings')
    ->clear('db_maintenance_all_tables')
    ->save();

  // 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) {

    // @FIXME
    // // @FIXME
    // // The correct configuration object could not be determined. You'll need to
    // // rewrite this call manually.
    // variable_del($row->name);
  }
}

Functions

Namesort descending Description
db_maintenance_uninstall Implements hook_uninstall().