You are here

function imagecache_uninstall in ImageCache 5.2

Same name and namespace in other branches
  1. 5 imagecache.install \imagecache_uninstall()
  2. 6.2 imagecache.install \imagecache_uninstall()

Implementation of hook_uninstall().

File

./imagecache.install, line 111

Code

function imagecache_uninstall() {
  db_query('DROP TABLE {imagecache_preset}');
  db_query('DROP TABLE {imagecache_action}');
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("DELETE FROM {sequences} WHERE name = '{imagecache_action}_actionid'");
      db_query("DELETE FROM {sequences} WHERE name = '{imagecache_action}_presetid'");
      break;
    case 'pgsql':
      db_query('DROP SEQUENCE {imagecache_action}_actionid_seq');
      db_query('DROP SEQUENCE {imagecache_preset}_presetid_seq');
      break;
  }
}