Index: imagecache.install
===================================================================
RCS file: /cvs/drupal/contributions/modules/imagecache/imagecache.install,v
retrieving revision 1.3
diff -u -p -r1.3 imagecache.install
--- imagecache.install	18 Oct 2006 01:15:00 -0000	1.3
+++ imagecache.install	14 Apr 2007 02:26:42 -0000
@@ -106,3 +106,23 @@ function imagecache_update_3() {
   }
   return $ret;
 }
+
+/**
+ * Implementation of hook_uninstall().
+ */
+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;
+  }
+}
