--- og/modules/og_panels/og_panels.install	2008-10-29 20:59:08.000000000 +0100
+++ og_panels.install	2008-11-10 17:21:56.000000000 +0100
@@ -2,35 +2,7 @@
 // $Id: og_panels.install,v 1.4 2008/10/29 19:59:08 dww Exp $
 
 function og_panels_install() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysql':
-    case 'mysqli':
-      db_query("CREATE TABLE {og_panels} (
-        did int NOT NULL,
-        nid int NOT NULL,
-        published int NOT NULL,
-        page_title varchar(255) NOT NULL,
-        path varchar(100) NOT NULL,
-        default_page int NULL,
-        show_blocks int NULL,
-        weight int(4) NOT NULL DEFAULT 0,
-        PRIMARY KEY  (did)
-      ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
-      break;
-    case 'pgsql':
-      db_query("CREATE TABLE {og_panels} (
-        did integer NOT NULL,
-        nid integer NOT NULL,
-        published integer NOT NULL,
-        page_title varchar(255) NOT NULL,
-        path varchar(100) NOT NULL,
-        default_page integer NULL,
-        show_blocks integer NULL,
-        weight integer(4) NOT NULL DEFAULT 0,
-        PRIMARY KEY  (did)
-      );");
-      break;
-  }
+  drupal_install_schema('og_panels');
 }
 
 function og_panels_update_5001() {
@@ -56,3 +28,67 @@ function og_panels_uninstall() {
     variable_del($variable);
   }
 }
+
+/**
+ * Implementation of hook_schema().
+ */
+function og_panels_schema() {
+  $schema['og_panels'] = array(
+    'description' => t('Stores a panel for a group'),
+    'fields' => array(
+      'nid'             => array(
+        'description'     => t("The group's {node}.nid."),
+        'type'            => 'int',
+        'size'            => 'normal',
+        'not null'        => TRUE,
+      ),
+      'did'             => array(
+        'description'     => t("The group's panels did."),
+        'type'            => 'int',
+        'size'            => 'normal',
+        'not null'        => TRUE,
+      ),
+      'published'             => array(
+        'description'     => t("is the panels published yet or not"),
+        'type'            => 'int',
+        'size'            => 'normal',
+        'not null'        => TRUE,
+      ),
+      'page_title'             => array(
+        'description'     => t("store the Pagetitle of the panel"),
+        'type'            => 'varchar',
+        'length'          => 255,
+        'not null'        => TRUE,
+      ),
+      'path'             => array(
+        'description'     => t("stores the path of the panel page"),
+        'type'            => 'varchar',
+        'length'          => 100,
+        'not null'        => TRUE,
+      ),
+      'default_page'             => array(
+        'description'     => t("stores wether the panel page is the default page"),
+        'type'            => 'int',
+        'size'            => 'normal',
+        'null'        => TRUE,
+      ),
+      'show_blocks'             => array(
+        'description'     => t("stores wether the panel page is the default page"),
+        'type'            => 'int',
+        'size'            => 'normal',
+        'null'        => TRUE,
+      ),
+      'weight'             => array(
+        'description'     => t("stores the page weight of the page"),
+        'type'            => 'int',
+        'size'            => 'normal',
+        'not null'        => TRUE,
+        'default' => '0',
+      ),
+    ),
+    'primary keys' => ('did'),
+  );
+
+  return $schema;
+}
