--- wymeditor.install.orig	2008-07-29 05:26:24.000000000 +0000
+++ wymeditor.install	2008-07-29 05:55:30.000000000 +0000
@@ -14,26 +14,32 @@ function wymeditor_install() {
 function wymeditor_schema() {
   $schema['wymeditor_profiles'] = array(
     'fields' => array(
-      'rid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'length' => '5'),
-      'settings' => array('type' => 'text', 'unsigned' => TRUE, 'not null' => TRUE)
-    ),
+      'rid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        ),
+      'settings' => array(
+        'type' => 'text',
+        'not null' => TRUE,
+        ),
+      ),
     'primary key' => array('rid')
-  );
+    );
+  return $schema;
 }
 
 /**
  * Implements hook_unistall().
  */
 function wymeditor_unistall() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysql':
-    case 'mysqli':
-      db_query('DROP TABLE {wymeditor_profiles}');
-      break;
-  }
+  drupal_uninstall_schema('wymeditor');
+  
   $filters =  filter_formats();
   foreach ($filters  as $filter) {
-    if ($filter->name == 'WYMeditor') filter_admin_delete_submit(NULL, array('format' => $filter->format));
+    if ($filter->name == 'WYMeditor') {
+      filter_admin_delete_submit(NULL, array('format' => $filter->format));
+    }
   }
 }
 
