Index: includes/common.inc
===================================================================
--- includes/common.inc	(revision 4)
+++ includes/common.inc	(working copy)
@@ -3214,8 +3214,8 @@
     }
     // Otherwise, rebuild the schema cache.
     else {
-      // Load the .schema files.
-      module_load_all_includes('schema');
+      // Load the .install files to get hook_schema.
+      module_load_all_includes('install');
 
       // Invoke hook_schema for all modules.
       foreach (module_implements('schema') as $module) {
@@ -3305,8 +3305,8 @@
  *   is returned.
  */
 function drupal_get_schema_unprocessed($module, $table = NULL) {
-  // Load the .schema file.
-  module_load_include('schema', $module);
+  // Load the .install file to get hook_schema.
+  module_load_include('install', $module);
   $schema = module_invoke($module, 'schema');
 
   if (!is_null($table) && isset($schema[$table])) {
@@ -3521,4 +3521,4 @@
     $encoded_tags[] = $tag;
   }
   return implode(', ', $encoded_tags);
-}
\ No newline at end of file
+}
Index: includes/database.inc
===================================================================
--- includes/database.inc	(revision 4)
+++ includes/database.inc	(working copy)
@@ -303,7 +303,7 @@
  *
  * A Drupal schema definition is an array structure representing one or
  * more tables and their related keys and indexes. A schema is defined by
- * hook_schema(), which usually lives in a modulename.schema file.
+ * hook_schema(), which usually lives in a modulename.installfile.
  *
  * By implenting hook_schema() and specifying the tables your module
  * declares, you can easily create and drop these tables on all
Index: modules/aggregator/aggregator.schema
===================================================================
--- modules/aggregator/aggregator.schema	(revision 4)
+++ modules/aggregator/aggregator.schema	(working copy)
@@ -1,70 +0,0 @@
-<?php
-// $Id: aggregator.schema,v 1.2 2007/06/15 07:15:24 dries Exp $
-
-function aggregator_schema() {
-  $schema['aggregator_category'] = array(
-    'fields' => array(
-      'cid'         => array('type' => 'serial', 'not null' => TRUE),
-      'title'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
-      'block'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
-    ),
-    'primary key' => array('cid'),
-    'unique keys' => array('title' => array('title')),
-  );
-
-  $schema['aggregator_category_feed'] = array(
-    'fields' => array(
-      'fid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
-    ),
-    'primary key' => array('fid', 'cid'),
-  );
-
-  $schema['aggregator_category_item'] = array(
-    'fields' => array(
-      'iid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
-    ),
-    'primary key' => array('iid', 'cid'),
-  );
-
-  $schema['aggregator_feed'] = array(
-    'fields' => array(
-      'fid'         => array('type' => 'serial', 'not null' => TRUE),
-      'title'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'url'         => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'refresh'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'checked'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'link'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
-      'image'       => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
-      'etag'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'modified'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'block'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
-    ),
-    'unique keys' => array(
-      'url'  => array('url'),
-      'title' => array('title')
-    ),
-    'primary key' => array('fid'),
-  );
-
-  $schema['aggregator_item'] = array(
-    'fields' => array(
-      'iid'         => array('type' => 'serial', 'not null' => TRUE),
-      'fid'         => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'title'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'link'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'author'      => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
-      'timestamp'   => array('type' => 'int', 'not null' => FALSE),
-      'guid'        => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE)
-    ),
-    'indexes' => array('fid' => array('fid')),
-    'primary key' => array('iid'),
-  );
-
-  return $schema;
-}
-
Index: modules/aggregator/aggregator.install
===================================================================
--- modules/aggregator/aggregator.install	(revision 4)
+++ modules/aggregator/aggregator.install	(working copy)
@@ -2,6 +2,77 @@
 // $Id: aggregator.install,v 1.9 2007/05/25 12:46:43 dries Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function aggregator_schema() {
+  $schema['aggregator_category'] = array(
+    'fields' => array(
+      'cid'         => array('type' => 'serial', 'not null' => TRUE),
+      'title'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
+      'block'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
+    ),
+    'primary key' => array('cid'),
+    'unique keys' => array('title' => array('title')),
+  );
+
+  $schema['aggregator_category_feed'] = array(
+    'fields' => array(
+      'fid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
+    ),
+    'primary key' => array('fid', 'cid'),
+  );
+
+  $schema['aggregator_category_item'] = array(
+    'fields' => array(
+      'iid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'cid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
+    ),
+    'primary key' => array('iid', 'cid'),
+  );
+
+  $schema['aggregator_feed'] = array(
+    'fields' => array(
+      'fid'         => array('type' => 'serial', 'not null' => TRUE),
+      'title'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'url'         => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'refresh'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'checked'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'link'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
+      'image'       => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
+      'etag'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'modified'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'block'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
+    ),
+    'unique keys' => array(
+      'url'  => array('url'),
+      'title' => array('title')
+    ),
+    'primary key' => array('fid'),
+  );
+
+  $schema['aggregator_item'] = array(
+    'fields' => array(
+      'iid'         => array('type' => 'serial', 'not null' => TRUE),
+      'fid'         => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'title'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'link'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'author'      => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'description' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
+      'timestamp'   => array('type' => 'int', 'not null' => FALSE),
+      'guid'        => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE)
+    ),
+    'indexes' => array('fid' => array('fid')),
+    'primary key' => array('iid'),
+  );
+
+  return $schema;
+}
+
+
+/**
  * Implementation of hook_install().
  */
 function aggregator_install() {
Index: modules/system/system.schema
===================================================================
--- modules/system/system.schema	(revision 4)
+++ modules/system/system.schema	(working copy)
@@ -1,195 +0,0 @@
-<?php
-// $Id: system.schema,v 1.6 2007/06/15 07:15:24 dries Exp $
-
-function system_schema() {
-  $schema['batch'] = array(
-    'fields' => array(
-      'bid'       => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'token'     => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE),
-      'timestamp' => array('type' => 'int', 'not null' => TRUE),
-      'batch'     => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium')
-    ),
-    'primary key' => array('bid'),
-    'indexes' => array('token' => array('token')),
-  );
-
-  $schema['cache'] = array(
-    'fields' => array(
-      'cid'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'data'       => array('type' => 'blob', 'not null' => FALSE, 'size' => 'big'),
-      'expire'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'created'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'headers'    => array('type' => 'text', 'not null' => FALSE),
-      'serialized' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0)
-    ),
-    'indexes' => array('expire' => array('expire')),
-    'primary key' => array('cid'),
-  );
-
-  $schema['cache_form'] = $schema['cache'];
-  $schema['cache_page'] = $schema['cache'];
-  $schema['cache_menu'] = $schema['cache'];
-
-  $schema['files'] = array(
-    'fields' => array(
-      'fid'       => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'uid'       => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'filename'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'filepath'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'filemime'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'filesize'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'status'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-    ),
-    'indexes' => array(
-      'uid'       => array('uid'),
-      'status'    => array('status'),
-      'timestamp' => array('timestamp'),
-    ),
-    'primary key' => array('fid'),
-  );
-
-  $schema['flood'] = array(
-    'fields' => array(
-      'fid'       => array('type' => 'serial', 'not null' => TRUE),
-      'event'     => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
-      'hostname'  => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
-    ),
-    'primary key' => array('fid'),
-  );
-
-  $schema['history'] = array(
-    'fields' => array(
-      'uid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'nid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
-    ),
-    'primary key' => array('uid', 'nid'),
-  );
-  $schema['menu_router'] = array(
-    'fields' => array(
-      'path'             => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'load_functions'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'to_arg_functions' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'access_callback'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'access_arguments' => array('type' => 'text', 'not null' => FALSE),
-      'page_callback'    => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'page_arguments'   => array('type' => 'text', 'not null' => FALSE),
-      'fit'              => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'number_parts'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
-      'tab_parent'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'tab_root'         => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'title'            => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'title_callback'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'title_arguments'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'type'             => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'block_callback'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'description'      => array('type' => 'text', 'not null' => TRUE),
-      'position'         => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'weight'           => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'file'             => array('type' => 'text', 'size' => 'medium')
-    ),
-    'indexes' => array(
-      'fit'        => array('fit'),
-      'tab_parent' => array('tab_parent')
-    ),
-    'primary key' => array('path'),
-  );
-
-  $schema['menu_links'] = array(
-    'fields' => array(
-      'menu_name'    => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
-      'mlid'         => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'plid'         => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'link_path'    => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'router_path'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'hidden'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
-      'external'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
-      'has_children' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
-      'expanded'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
-      'weight'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'depth'        => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
-      'p1'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'p2'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'p3'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'p4'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'p5'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'p6'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'module'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => 'system'),
-      'link_title'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'options'      => array('type' => 'text', 'not null' => FALSE)
-    ),
-    'indexes' => array(
-      'expanded_children' => array('expanded', 'has_children'),
-      'menu_name_path' => array('menu_name', 'link_path'),
-      'plid'=> array('plid'),
-      'parents' => array('p1', 'p2', 'p3', 'p4', 'p5'),
-      'router_path' => array('router_path'),
-    ),
-    'primary key' => array('mlid'),
-  );
-
-  $schema['sequences'] = array(
-    'fields' => array(
-      'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'id'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
-    ),
-    'primary key' => array('name'),
-  );
-
-  $schema['sessions'] = array(
-    'fields' => array(
-      'uid'       => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
-      'sid'       => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
-      'hostname'  => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'cache'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'session'   => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium')
-    ),
-    'primary key' => array('sid'),
-    'indexes' => array(
-      'timestamp' => array('timestamp'),
-      'uid'       => array('uid')
-    ),
-  );
-
-  $schema['system'] = array(
-    'fields' => array(
-      'filename'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'name'           => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'type'           => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'owner'          => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'status'         => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'throttle'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'bootstrap'      => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'schema_version' => array('type' => 'int', 'not null' => TRUE, 'default' => -1, 'size' => 'small'),
-      'weight'         => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'info'           => array('type' => 'text', 'not null' => FALSE)
-    ),
-    'primary key' => array('filename'),
-    'indexes' => array('weight' => array('weight')),
-  );
-
-  $schema['url_alias'] = array(
-    'fields' => array(
-      'pid'      => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'src'      => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'dst'      => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'language' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => '')
-    ),
-    'unique keys' => array('dst_language' => array('dst', 'language')),
-    'primary key' => array('pid'),
-    'indexes' => array('src' => array('src')),
-  );
-
-  $schema['variable'] = array(
-    'fields' => array(
-      'name'     => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'value'    => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
-    ),
-    'primary key' => array('name'),
-  );
-
-  return $schema;
-}
Index: modules/system/system.install
===================================================================
--- modules/system/system.install	(revision 4)
+++ modules/system/system.install	(working copy)
@@ -2,6 +2,202 @@
 // $Id: system.install,v 1.125 2007/06/30 08:17:05 goba Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function system_schema() {
+  $schema['batch'] = array(
+    'fields' => array(
+      'bid'       => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'token'     => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE),
+      'timestamp' => array('type' => 'int', 'not null' => TRUE),
+      'batch'     => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium')
+    ),
+    'primary key' => array('bid'),
+    'indexes' => array('token' => array('token')),
+  );
+
+  $schema['cache'] = array(
+    'fields' => array(
+      'cid'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'data'       => array('type' => 'blob', 'not null' => FALSE, 'size' => 'big'),
+      'expire'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'created'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'headers'    => array('type' => 'text', 'not null' => FALSE),
+      'serialized' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0)
+    ),
+    'indexes' => array('expire' => array('expire')),
+    'primary key' => array('cid'),
+  );
+
+  $schema['cache_form'] = $schema['cache'];
+  $schema['cache_page'] = $schema['cache'];
+  $schema['cache_menu'] = $schema['cache'];
+
+  $schema['files'] = array(
+    'fields' => array(
+      'fid'       => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'uid'       => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'filename'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'filepath'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'filemime'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'filesize'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'status'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+    ),
+    'indexes' => array(
+      'uid'       => array('uid'),
+      'status'    => array('status'),
+      'timestamp' => array('timestamp'),
+    ),
+    'primary key' => array('fid'),
+  );
+
+  $schema['flood'] = array(
+    'fields' => array(
+      'fid'       => array('type' => 'serial', 'not null' => TRUE),
+      'event'     => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
+      'hostname'  => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
+    ),
+    'primary key' => array('fid'),
+  );
+
+  $schema['history'] = array(
+    'fields' => array(
+      'uid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'nid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
+    ),
+    'primary key' => array('uid', 'nid'),
+  );
+  $schema['menu_router'] = array(
+    'fields' => array(
+      'path'             => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'load_functions'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'to_arg_functions' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'access_callback'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'access_arguments' => array('type' => 'text', 'not null' => FALSE),
+      'page_callback'    => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'page_arguments'   => array('type' => 'text', 'not null' => FALSE),
+      'fit'              => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'number_parts'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
+      'tab_parent'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'tab_root'         => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'title'            => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'title_callback'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'title_arguments'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'type'             => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'block_callback'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'description'      => array('type' => 'text', 'not null' => TRUE),
+      'position'         => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'weight'           => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'file'             => array('type' => 'text', 'size' => 'medium')
+    ),
+    'indexes' => array(
+      'fit'        => array('fit'),
+      'tab_parent' => array('tab_parent')
+    ),
+    'primary key' => array('path'),
+  );
+
+  $schema['menu_links'] = array(
+    'fields' => array(
+      'menu_name'    => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
+      'mlid'         => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'plid'         => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'link_path'    => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'router_path'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'hidden'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
+      'external'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
+      'has_children' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
+      'expanded'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
+      'weight'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'depth'        => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'small'),
+      'p1'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'p2'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'p3'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'p4'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'p5'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'p6'           => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'module'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => 'system'),
+      'link_title'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'options'      => array('type' => 'text', 'not null' => FALSE)
+    ),
+    'indexes' => array(
+      'expanded_children' => array('expanded', 'has_children'),
+      'menu_name_path' => array('menu_name', 'link_path'),
+      'plid'=> array('plid'),
+      'parents' => array('p1', 'p2', 'p3', 'p4', 'p5'),
+      'router_path' => array('router_path'),
+    ),
+    'primary key' => array('mlid'),
+  );
+
+  $schema['sequences'] = array(
+    'fields' => array(
+      'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'id'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
+    ),
+    'primary key' => array('name'),
+  );
+
+  $schema['sessions'] = array(
+    'fields' => array(
+      'uid'       => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
+      'sid'       => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
+      'hostname'  => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'cache'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'session'   => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium')
+    ),
+    'primary key' => array('sid'),
+    'indexes' => array(
+      'timestamp' => array('timestamp'),
+      'uid'       => array('uid')
+    ),
+  );
+
+  $schema['system'] = array(
+    'fields' => array(
+      'filename'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'name'           => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'type'           => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'owner'          => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'status'         => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'throttle'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'bootstrap'      => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'schema_version' => array('type' => 'int', 'not null' => TRUE, 'default' => -1, 'size' => 'small'),
+      'weight'         => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'info'           => array('type' => 'text', 'not null' => FALSE)
+    ),
+    'primary key' => array('filename'),
+    'indexes' => array('weight' => array('weight')),
+  );
+
+  $schema['url_alias'] = array(
+    'fields' => array(
+      'pid'      => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'src'      => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'dst'      => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'language' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => '')
+    ),
+    'unique keys' => array('dst_language' => array('dst', 'language')),
+    'primary key' => array('pid'),
+    'indexes' => array('src' => array('src')),
+  );
+
+  $schema['variable'] = array(
+    'fields' => array(
+      'name'     => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'value'    => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
+    ),
+    'primary key' => array('name'),
+  );
+
+  return $schema;
+}
+
+/**
  * Test and report Drupal installation requirements.
  */
 function system_requirements($phase) {
Index: modules/upload/upload.schema
===================================================================
--- modules/upload/upload.schema	(revision 4)
+++ modules/upload/upload.schema	(working copy)
@@ -1,19 +0,0 @@
-<?php
-// $Id: upload.schema,v 1.1 2007/05/30 08:08:59 dries Exp $
-
-function upload_schema() {
-  $schema['upload'] = array(
-    'fields' => array(
-      'fid'         => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'nid'         => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'vid'         => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'description' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'list'        => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
-    ),
-    'primary key' => array('fid', 'vid'),
-    'indexes' => array('vid' => array('vid'), 'nid' => array('nid')),
-  );
-
-  return $schema;
-}
-
Index: modules/upload/upload.install
===================================================================
--- modules/upload/upload.install	(revision 4)
+++ modules/upload/upload.install	(working copy)
@@ -2,6 +2,25 @@
 // $Id: upload.install,v 1.1 2007/05/30 08:08:59 dries Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function upload_schema() {
+  $schema['upload'] = array(
+    'fields' => array(
+      'fid'         => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'nid'         => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'vid'         => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'description' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'list'        => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
+    ),
+    'primary key' => array('fid', 'vid'),
+    'indexes' => array('vid' => array('vid'), 'nid' => array('nid')),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function upload_install() {
Index: modules/drupal/drupal.schema
===================================================================
--- modules/drupal/drupal.schema	(revision 4)
+++ modules/drupal/drupal.schema	(working copy)
@@ -1,33 +0,0 @@
-<?php
-// $Id: drupal.schema,v 1.1 2007/05/25 12:46:44 dries Exp $
-
-function drupal_schema() {
-  $schema['client'] = array(
-    'fields' => array(
-      'cid'     => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'link'    => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'name'    => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'mail'    => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'slogan'  => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
-      'mission' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
-      'users'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'nodes'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'version' => array('type' => 'varchar', 'length' => 35, 'not null' => TRUE, 'default' => ''),
-      'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'changed' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
-    ),
-    'primary key' => array('cid'),
-  );
-
-  $schema['client_system'] = array(
-    'fields' => array(
-      'cid'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'type' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '')
-    ),
-    'primary key' => array('cid', 'name'),
-  );
-
-  return $schema;
-}
-
Index: modules/drupal/drupal.install
===================================================================
--- modules/drupal/drupal.install	(revision 4)
+++ modules/drupal/drupal.install	(working copy)
@@ -2,6 +2,39 @@
 // $Id: drupal.install,v 1.6 2007/05/25 12:46:44 dries Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function drupal_schema() {
+  $schema['client'] = array(
+    'fields' => array(
+      'cid'     => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'link'    => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'name'    => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'mail'    => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'slogan'  => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
+      'mission' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
+      'users'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'nodes'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'version' => array('type' => 'varchar', 'length' => 35, 'not null' => TRUE, 'default' => ''),
+      'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'changed' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
+    ),
+    'primary key' => array('cid'),
+  );
+
+  $schema['client_system'] = array(
+    'fields' => array(
+      'cid'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'type' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '')
+    ),
+    'primary key' => array('cid', 'name'),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function drupal_install() {
Index: modules/statistics/statistics.install
===================================================================
--- modules/statistics/statistics.install	(revision 4)
+++ modules/statistics/statistics.install	(working copy)
@@ -2,6 +2,29 @@
 // $Id: statistics.install,v 1.8 2007/05/25 12:46:45 dries Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function statistics_schema() {
+  $schema['accesslog'] = array(
+    'fields' => array(
+      'aid'       => array('type' => 'serial', 'not null' => TRUE),
+      'sid'       => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
+      'title'     => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
+      'path'      => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
+      'url'       => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
+      'hostname'  => array('type' => 'varchar', 'length' => 128, 'not null' => FALSE),
+      'uid'       => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0),
+      'timer'     => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
+    ),
+    'indexes' => array('accesslog_timestamp' => array('timestamp')),
+    'primary key' => array('aid'),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function statistics_install() {
Index: modules/statistics/statistics.schema
===================================================================
--- modules/statistics/statistics.schema	(revision 4)
+++ modules/statistics/statistics.schema	(working copy)
@@ -1,23 +0,0 @@
-<?php
-// $Id: statistics.schema,v 1.1 2007/05/25 12:46:45 dries Exp $
-
-function statistics_schema() {
-  $schema['accesslog'] = array(
-    'fields' => array(
-      'aid'       => array('type' => 'serial', 'not null' => TRUE),
-      'sid'       => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
-      'title'     => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
-      'path'      => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
-      'url'       => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
-      'hostname'  => array('type' => 'varchar', 'length' => 128, 'not null' => FALSE),
-      'uid'       => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0),
-      'timer'     => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
-    ),
-    'indexes' => array('accesslog_timestamp' => array('timestamp')),
-    'primary key' => array('aid'),
-  );
-
-  return $schema;
-}
-
Index: modules/book/book.install
===================================================================
--- modules/book/book.install	(revision 4)
+++ modules/book/book.install	(working copy)
@@ -2,6 +2,27 @@
 // $Id: book.install,v 1.7 2007/05/25 12:46:43 dries Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function book_schema() {
+  $schema['book'] = array(
+    'fields' => array(
+      'vid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'nid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'parent' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
+    ),
+    'indexes' => array(
+      'nid'    => array('nid'),
+      'parent' => array('parent')
+    ),
+    'primary key' => array('vid'),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function book_install() {
Index: modules/book/book.schema
===================================================================
--- modules/book/book.schema	(revision 4)
+++ modules/book/book.schema	(working copy)
@@ -1,21 +0,0 @@
-<?php
-// $Id: book.schema,v 1.1 2007/05/25 12:46:43 dries Exp $
-
-function book_schema() {
-  $schema['book'] = array(
-    'fields' => array(
-      'vid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'nid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'parent' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
-    ),
-    'indexes' => array(
-      'nid'    => array('nid'),
-      'parent' => array('parent')
-    ),
-    'primary key' => array('vid'),
-  );
-
-  return $schema;
-}
-
Index: modules/locale/locale.install
===================================================================
--- modules/locale/locale.install	(revision 4)
+++ modules/locale/locale.install	(working copy)
@@ -2,6 +2,78 @@
 // $Id: locale.install,v 1.14 2007/06/17 17:41:40 goba Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function locale_schema() {
+  $schema['languages'] = array(
+    'fields' => array(
+      // Language code, eg 'de' or 'en-US'.
+      'language'   => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''),
+      // Language name in English.
+      'name'       => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
+      // Native language name.
+      'native'     => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
+      // LANGUAGE_RTL or LANGUAGE_LTR
+      'direction'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      // Enabled flag.
+      'enabled'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      // Number of plural indexes in this language.
+      'plurals'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      // Plural formula in PHP code to evaluate to get plural indexes.
+      'formula'    => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      // Domain to use for this language.
+      'domain'     => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      // Path prefix to use for this language.
+      'prefix'     => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      // Weight, used in lists of languages.
+      'weight'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      // Location of JavaScript translation file.
+      'javascript' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
+    ),
+    'primary key' => array('language'),
+  );
+
+  $schema['locales_source'] = array(
+    'fields' => array(
+      // Unique indentifier of this string.
+      'lid'       => array('type' => 'serial', 'not null' => TRUE),
+      // Drupal path in case of online discovered translations or file path in case of imported strings.
+      'location'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      // A module defined group of translations, see hook_locale().
+      'textgroup' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      // The original string in English.
+      'source'    => array('type' => 'text', 'mysql_type' => 'blob', 'not null' => TRUE),
+    ),
+    'primary key' => array('lid'),
+    'indexes' => array
+        ('source' => array(array('source', 30))),
+  );
+
+  $schema['locales_target'] = array(
+    'fields' => array(
+      // References locales_source.
+      'lid'         => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      // Translation string value in this language.
+      'translation' => array('type' => 'text', 'mysql_type' => 'blob', 'not null' => TRUE),
+      // Language code referencing the languages table.
+      'language'    => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''),
+      // Parent lid (lid of the previous string in the plural chain) in case of plural strings.
+      'plid'        => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      // Plural index number in case of plural strings.
+      'plural'      => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
+    ),
+    'indexes' => array(
+      'language'   => array('language'),
+      'lid'    => array('lid'),
+      'plid'   => array('plid'),
+      'plural' => array('plural')
+    ),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function locale_install() {
Index: modules/locale/locale.schema
===================================================================
--- modules/locale/locale.schema	(revision 4)
+++ modules/locale/locale.schema	(working copy)
@@ -1,72 +0,0 @@
-<?php
-// $Id: locale.schema,v 1.4 2007/06/18 13:00:02 goba Exp $
-
-function locale_schema() {
-  $schema['languages'] = array(
-    'fields' => array(
-      // Language code, eg 'de' or 'en-US'.
-      'language'   => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''),
-      // Language name in English.
-      'name'       => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
-      // Native language name.
-      'native'     => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
-      // LANGUAGE_RTL or LANGUAGE_LTR
-      'direction'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      // Enabled flag.
-      'enabled'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      // Number of plural indexes in this language.
-      'plurals'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      // Plural formula in PHP code to evaluate to get plural indexes.
-      'formula'    => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      // Domain to use for this language.
-      'domain'     => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      // Path prefix to use for this language.
-      'prefix'     => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      // Weight, used in lists of languages.
-      'weight'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      // Location of JavaScript translation file.
-      'javascript' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
-    ),
-    'primary key' => array('language'),
-  );
-
-  $schema['locales_source'] = array(
-    'fields' => array(
-      // Unique indentifier of this string.
-      'lid'       => array('type' => 'serial', 'not null' => TRUE),
-      // Drupal path in case of online discovered translations or file path in case of imported strings.
-      'location'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      // A module defined group of translations, see hook_locale().
-      'textgroup' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      // The original string in English.
-      'source'    => array('type' => 'text', 'mysql_type' => 'blob', 'not null' => TRUE),
-    ),
-    'primary key' => array('lid'),
-    'indexes' => array
-        ('source' => array(array('source', 30))),
-  );
-
-  $schema['locales_target'] = array(
-    'fields' => array(
-      // References locales_source.
-      'lid'         => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      // Translation string value in this language.
-      'translation' => array('type' => 'text', 'mysql_type' => 'blob', 'not null' => TRUE),
-      // Language code referencing the languages table.
-      'language'    => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''),
-      // Parent lid (lid of the previous string in the plural chain) in case of plural strings.
-      'plid'        => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      // Plural index number in case of plural strings.
-      'plural'      => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
-    ),
-    'indexes' => array(
-      'language'   => array('language'),
-      'lid'    => array('lid'),
-      'plid'   => array('plid'),
-      'plural' => array('plural')
-    ),
-  );
-
-  return $schema;
-}
-
Index: modules/menu/menu.schema
===================================================================
--- modules/menu/menu.schema	(revision 4)
+++ modules/menu/menu.schema	(working copy)
@@ -1,16 +0,0 @@
-<?php
-// $Id: menu.schema,v 1.3 2007/05/27 20:31:13 dries Exp $
-
-function menu_schema() {
-  $schema['menu_custom'] = array(
-    'fields' => array(
-      'menu_name'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'title'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'description' => array('type' => 'text', 'not null' => FALSE),
-    ),
-    'primary key' => array('menu_name'),
-  );
-
-  return $schema;
-}
-
Index: modules/menu/menu.install
===================================================================
--- modules/menu/menu.install	(revision 4)
+++ modules/menu/menu.install	(working copy)
@@ -2,6 +2,23 @@
 // $Id: menu.install,v 1.5 2007/06/05 09:15:02 dries Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function menu_schema() {
+  $schema['menu_custom'] = array(
+    'fields' => array(
+      'menu_name'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'title'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'description' => array('type' => 'text', 'not null' => FALSE),
+    ),
+    'primary key' => array('menu_name'),
+  );
+
+  return $schema;
+}
+
+
+/**
  * Implementation of hook_install().
  */
 function menu_install() {
Index: modules/search/search.schema
===================================================================
--- modules/search/search.schema	(revision 4)
+++ modules/search/search.schema	(working copy)
@@ -1,40 +0,0 @@
-<?php
-// $Id: search.schema,v 1.2 2007/06/15 07:15:24 dries Exp $
-
-function search_schema() {
-  $schema['search_dataset'] = array(
-    'fields' => array(
-      'sid'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'type' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE),
-      'data' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium')
-    ),
-    'indexes' => array('sid_type' => array('sid', 'type')),
-  );
-
-  $schema['search_index'] = array(
-    'fields' => array(
-      'word'     => array('type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''),
-      'sid'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'type'     => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE),
-      'fromsid'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'fromtype' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE),
-      'score'    => array('type' => 'float', 'not null' => FALSE)
-    ),
-    'indexes' => array(
-      'from_sid_type' => array('fromsid', 'fromtype'),
-      'sid_type'      => array('sid', 'type'),
-      'word'          => array('word')
-    ),
-  );
-
-  $schema['search_total'] = array(
-    'fields' => array(
-      'word'  => array('type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''),
-      'count' => array('type' => 'float', 'not null' => FALSE)
-    ),
-    'primary key' => array('word'),
-  );
-
-  return $schema;
-}
-
Index: modules/search/search.install
===================================================================
--- modules/search/search.install	(revision 4)
+++ modules/search/search.install	(working copy)
@@ -2,6 +2,46 @@
 // $Id: search.install,v 1.7 2007/05/25 12:46:45 dries Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function search_schema() {
+  $schema['search_dataset'] = array(
+    'fields' => array(
+      'sid'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'type' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE),
+      'data' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium')
+    ),
+    'indexes' => array('sid_type' => array('sid', 'type')),
+  );
+
+  $schema['search_index'] = array(
+    'fields' => array(
+      'word'     => array('type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''),
+      'sid'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'type'     => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE),
+      'fromsid'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'fromtype' => array('type' => 'varchar', 'length' => 16, 'not null' => FALSE),
+      'score'    => array('type' => 'float', 'not null' => FALSE)
+    ),
+    'indexes' => array(
+      'from_sid_type' => array('fromsid', 'fromtype'),
+      'sid_type'      => array('sid', 'type'),
+      'word'          => array('word')
+    ),
+  );
+
+  $schema['search_total'] = array(
+    'fields' => array(
+      'word'  => array('type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''),
+      'count' => array('type' => 'float', 'not null' => FALSE)
+    ),
+    'primary key' => array('word'),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function search_install() {
Index: modules/openid/openid.install
===================================================================
--- modules/openid/openid.install	(revision 4)
+++ modules/openid/openid.install	(working copy)
@@ -2,6 +2,26 @@
 // $Id: openid.install,v 1.1 2007/06/18 16:09:39 dries Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function openid_schema() {
+  $schema['openid_association'] = array(
+    'fields' => array(
+      'idp_endpoint_uri' => array('type' => 'varchar', 'length' => 255),
+      'assoc_handle' => array('type' => 'varchar', 'length' => 255),
+      'assoc_type' => array('type' => 'varchar', 'length' => 32),
+      'session_type' => array('type' => 'varchar', 'length' => 32),
+      'mac_key' => array('type' => 'varchar', 'length' => 255),
+      'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'expires_in' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+    ),
+    'primary key' => array('assoc_handle'),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function openid_install() {
Index: modules/openid/openid.schema
===================================================================
--- modules/openid/openid.schema	(revision 4)
+++ modules/openid/openid.schema	(working copy)
@@ -1,19 +0,0 @@
-<?php
-// $Id: openid.schema,v 1.1 2007/06/18 16:09:39 dries Exp $
-
-function openid_schema() {
-  $schema['openid_association'] = array(
-    'fields' => array(
-      'idp_endpoint_uri' => array('type' => 'varchar', 'length' => 255),
-      'assoc_handle' => array('type' => 'varchar', 'length' => 255),
-      'assoc_type' => array('type' => 'varchar', 'length' => 32),
-      'session_type' => array('type' => 'varchar', 'length' => 32),
-      'mac_key' => array('type' => 'varchar', 'length' => 255),
-      'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'expires_in' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-    ),
-    'primary key' => array('assoc_handle'),
-  );
-
-  return $schema;
-}
\ No newline at end of file
Index: modules/color/color.install
===================================================================
--- modules/color/color.install	(revision 4)
+++ modules/color/color.install	(working copy)
@@ -1,6 +1,9 @@
 <?php
-/* $Id: color.install,v 1.2 2006/12/05 05:49:50 dries Exp $ */
+// $Id: color.install,v 1.2 2006/12/05 05:49:50 dries Exp $
 
+/**
+ * Implementation of hook_requirements().
+ */
 function color_requirements($phase) {
   $requirements = array();
 
Index: modules/taxonomy/taxonomy.install
===================================================================
--- modules/taxonomy/taxonomy.install	(revision 0)
+++ modules/taxonomy/taxonomy.install	(revision 0)
@@ -0,0 +1,103 @@
+<?php
+// $Id$
+
+/**
+ * Implementation of hook_schema().
+ */
+function taxonomy_schema() {
+  $schema['term_data'] = array(
+    'fields' => array(
+      'tid'         => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'vid'         => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'name'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'description' => array('type' => 'text', 'not null' => FALSE, 'size' => 'big'),
+      'weight'      => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
+    ),
+    'primary key' => array('tid'),
+    'indexes' => array('vid' => array('vid')),
+  );
+
+  $schema['term_hierarchy'] = array(
+    'fields' => array(
+      'tid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'parent' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
+    ),
+    'indexes' => array(
+      'parent' => array('parent'),
+      'tid'    => array('tid')
+    ),
+    'primary key' => array('tid', 'parent'),
+  );
+
+  $schema['term_node'] = array(
+    'fields' => array(
+      'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
+    ),
+    'indexes' => array(
+      'nid' => array('nid'),
+      'tid' => array('tid'),
+      'vid' => array('vid')
+    ),
+    'primary key' => array(
+      'vid',
+      'tid',
+      'nid'
+    ),
+  );
+
+  $schema['term_relation'] = array(
+    'fields' => array(
+      'trid' => array('type' => 'serial', 'not null' => TRUE),
+      'tid1' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'tid2' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
+    ),
+    'indexes' => array(
+      'tid1' => array('tid1'),
+      'tid2' => array('tid2')
+    ),
+    'primary key' => array('trid'),
+  );
+
+  $schema['term_synonym'] = array(
+    'fields' => array(
+      'tsid' => array('type' => 'serial', 'not null' => TRUE),
+      'tid'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '')
+    ),
+    'indexes' => array(
+      'name' => array(array('name', 3)),
+      'tid'  => array('tid')
+    ),
+    'primary key' => array('tsid'),
+  );
+
+  $schema['vocabulary'] = array(
+    'fields' => array(
+      'vid'         => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'name'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'description' => array('type' => 'text', 'not null' => FALSE, 'size' => 'big'),
+      'help'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'relations'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'hierarchy'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'multiple'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'required'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'tags'        => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'module'      => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'weight'      => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
+    ),
+    'primary key' => array('vid'),
+  );
+
+  $schema['vocabulary_node_types'] = array(
+    'fields' => array(
+      'vid'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'type' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => '')
+    ),
+    'primary key' => array('vid', 'type'),
+  );
+
+  return $schema;
+}
+
Index: modules/taxonomy/taxonomy.schema
===================================================================
--- modules/taxonomy/taxonomy.schema	(revision 4)
+++ modules/taxonomy/taxonomy.schema	(working copy)
@@ -1,100 +0,0 @@
-<?php
-// $Id: taxonomy.schema,v 1.1 2007/05/25 12:46:46 dries Exp $
-
-function taxonomy_schema() {
-  $schema['term_data'] = array(
-    'fields' => array(
-      'tid'         => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'vid'         => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'name'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'description' => array('type' => 'text', 'not null' => FALSE, 'size' => 'big'),
-      'weight'      => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
-    ),
-    'primary key' => array('tid'),
-    'indexes' => array('vid' => array('vid')),
-  );
-
-  $schema['term_hierarchy'] = array(
-    'fields' => array(
-      'tid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'parent' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
-    ),
-    'indexes' => array(
-      'parent' => array('parent'),
-      'tid'    => array('tid')
-    ),
-    'primary key' => array('tid', 'parent'),
-  );
-
-  $schema['term_node'] = array(
-    'fields' => array(
-      'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
-    ),
-    'indexes' => array(
-      'nid' => array('nid'),
-      'tid' => array('tid'),
-      'vid' => array('vid')
-    ),
-    'primary key' => array(
-      'vid',
-      'tid',
-      'nid'
-    ),
-  );
-
-  $schema['term_relation'] = array(
-    'fields' => array(
-      'trid' => array('type' => 'serial', 'not null' => TRUE),
-      'tid1' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'tid2' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
-    ),
-    'indexes' => array(
-      'tid1' => array('tid1'),
-      'tid2' => array('tid2')
-    ),
-    'primary key' => array('trid'),
-  );
-
-  $schema['term_synonym'] = array(
-    'fields' => array(
-      'tsid' => array('type' => 'serial', 'not null' => TRUE),
-      'tid'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '')
-    ),
-    'indexes' => array(
-      'name' => array(array('name', 3)),
-      'tid'  => array('tid')
-    ),
-    'primary key' => array('tsid'),
-  );
-
-  $schema['vocabulary'] = array(
-    'fields' => array(
-      'vid'         => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'name'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'description' => array('type' => 'text', 'not null' => FALSE, 'size' => 'big'),
-      'help'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'relations'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'hierarchy'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'multiple'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'required'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'tags'        => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'module'      => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'weight'      => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
-    ),
-    'primary key' => array('vid'),
-  );
-
-  $schema['vocabulary_node_types'] = array(
-    'fields' => array(
-      'vid'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'type' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => '')
-    ),
-    'primary key' => array('vid', 'type'),
-  );
-
-  return $schema;
-}
-
Index: modules/node/node.schema
===================================================================
--- modules/node/node.schema	(revision 4)
+++ modules/node/node.schema	(working copy)
@@ -1,111 +0,0 @@
-<?php
-// $Id: node.schema,v 1.3 2007/06/15 18:40:14 goba Exp $
-
-function node_schema() {
-  $schema['node'] = array(
-    'fields' => array(
-      'nid'       => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'vid'       => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0),
-      'type'      => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
-      'language'  => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''),
-      'title'     => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'uid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'status'    => array('type' => 'int', 'not null' => TRUE, 'default' => 1),
-      'created'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'changed'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'comment'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'promote'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'moderate'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'sticky'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'tnid'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'translate' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-    ),
-    'indexes' => array(
-      'nid'                 => array('nid'),
-      'node_changed'        => array('changed'),
-      'node_created'        => array('created'),
-      'node_moderate'       => array('moderate'),
-      'node_promote_status' => array('promote', 'status'),
-      'node_status_type'    => array('status', 'type', 'nid'),
-      'node_title_type'     => array('title', array('type', 4)),
-      'node_type'           => array(array('type', 4)),
-      'status'              => array('status'),
-      'uid'                 => array('uid'),
-      'tnid'                => array('tnid'),
-      'translate'           => array('translate'),
-    ),
-    'unique keys' => array(
-      'nid_vid' => array('nid', 'vid'),
-      'vid'     => array('vid')
-    ),
-    'primary key' => array('nid'),
-  );
-
-  $schema['node_access'] = array(
-    'fields' => array(
-      'nid'          => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'gid'          => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'realm'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'grant_view'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'grant_update' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'grant_delete' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
-    ),
-    'primary key' => array(
-      'nid',
-      'gid',
-      'realm'
-    ),
-  );
-
-  $schema['node_counter'] = array(
-    'fields' => array(
-      'nid'        => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'totalcount' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'big'),
-      'daycount'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'medium'),
-      'timestamp'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
-    ),
-    'primary key' => array('nid'),
-  );
-
-  $schema['node_revisions'] = array(
-    'fields' => array(
-      'nid'       => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'vid'       => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'uid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'title'     => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'body'      => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
-      'teaser'    => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
-      'log'       => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
-      'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'format'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
-    ),
-    'indexes' => array(
-      'nid' => array('nid'),
-      'uid' => array('uid')
-    ),
-    'primary key' => array('vid'),
-  );
-
-  $schema['node_type'] = array(
-    'fields' => array(
-      'type'           => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE),
-      'name'           => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'module'         => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE),
-      'description'    => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
-      'help'           => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
-      'has_title'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'size' => 'tiny'),
-      'title_label'    => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'has_body'       => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'size' => 'tiny'),
-      'body_label'     => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'min_word_count' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'size' => 'small'),
-      'custom'         => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'modified'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'locked'         => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'orig_type'      => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '')
-    ),
-    'primary key' => array('type'),
-  );
-
-  return $schema;
-}
-
Index: modules/node/node.install
===================================================================
--- modules/node/node.install	(revision 0)
+++ modules/node/node.install	(revision 0)
@@ -0,0 +1,113 @@
+<?php
+// $Id$
+
+/**
+ * Implementation of hook_schema().
+ */
+function node_schema() {
+  $schema['node'] = array(
+    'fields' => array(
+      'nid'       => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'vid'       => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0),
+      'type'      => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
+      'language'  => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''),
+      'title'     => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'uid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'status'    => array('type' => 'int', 'not null' => TRUE, 'default' => 1),
+      'created'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'changed'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'comment'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'promote'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'moderate'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'sticky'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'tnid'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'translate' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+    ),
+    'indexes' => array(
+      'nid'                 => array('nid'),
+      'node_changed'        => array('changed'),
+      'node_created'        => array('created'),
+      'node_moderate'       => array('moderate'),
+      'node_promote_status' => array('promote', 'status'),
+      'node_status_type'    => array('status', 'type', 'nid'),
+      'node_title_type'     => array('title', array('type', 4)),
+      'node_type'           => array(array('type', 4)),
+      'status'              => array('status'),
+      'uid'                 => array('uid'),
+      'tnid'                => array('tnid'),
+      'translate'           => array('translate'),
+    ),
+    'unique keys' => array(
+      'nid_vid' => array('nid', 'vid'),
+      'vid'     => array('vid')
+    ),
+    'primary key' => array('nid'),
+  );
+
+  $schema['node_access'] = array(
+    'fields' => array(
+      'nid'          => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'gid'          => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'realm'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'grant_view'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'grant_update' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'grant_delete' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
+    ),
+    'primary key' => array(
+      'nid',
+      'gid',
+      'realm'
+    ),
+  );
+
+  $schema['node_counter'] = array(
+    'fields' => array(
+      'nid'        => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'totalcount' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'big'),
+      'daycount'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'medium'),
+      'timestamp'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
+    ),
+    'primary key' => array('nid'),
+  );
+
+  $schema['node_revisions'] = array(
+    'fields' => array(
+      'nid'       => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'vid'       => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'uid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'title'     => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'body'      => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
+      'teaser'    => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
+      'log'       => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
+      'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'format'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
+    ),
+    'indexes' => array(
+      'nid' => array('nid'),
+      'uid' => array('uid')
+    ),
+    'primary key' => array('vid'),
+  );
+
+  $schema['node_type'] = array(
+    'fields' => array(
+      'type'           => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE),
+      'name'           => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'module'         => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE),
+      'description'    => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
+      'help'           => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
+      'has_title'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'size' => 'tiny'),
+      'title_label'    => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'has_body'       => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'size' => 'tiny'),
+      'body_label'     => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'min_word_count' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'size' => 'small'),
+      'custom'         => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'modified'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'locked'         => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'orig_type'      => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '')
+    ),
+    'primary key' => array('type'),
+  );
+
+  return $schema;
+}
Index: modules/filter/filter.schema
===================================================================
--- modules/filter/filter.schema	(revision 4)
+++ modules/filter/filter.schema	(working copy)
@@ -1,31 +0,0 @@
-<?php
-// $Id: filter.schema,v 1.1 2007/05/25 12:46:44 dries Exp $
-
-function filter_schema() {
-  $schema['filters'] = array(
-    'fields' => array(
-      'fid'    => array('type' => 'serial', 'not null' => TRUE),
-      'format' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'module' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
-      'delta'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
-    ),
-    'primary key' => array('fid'),
-    'indexes' => array('weight' => array('weight')),
-  );
-  $schema['filter_formats'] = array(
-    'fields' => array(
-      'format' => array('type' => 'serial', 'not null' => TRUE),
-      'name'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'roles'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'cache'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
-    ),
-    'unique keys' => array('name' => array('name')),
-    'primary key' => array('format'),
-  );
-
-  $schema['cache_filter'] = drupal_get_schema_unprocessed('system', 'cache');
-
-  return $schema;
-}
-
Index: modules/filter/filter.install
===================================================================
--- modules/filter/filter.install	(revision 0)
+++ modules/filter/filter.install	(revision 0)
@@ -0,0 +1,33 @@
+<?php
+// $Id$
+
+/**
+ * Implementation of hook_schema().
+ */
+function filter_schema() {
+  $schema['filters'] = array(
+    'fields' => array(
+      'fid'    => array('type' => 'serial', 'not null' => TRUE),
+      'format' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'module' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
+      'delta'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
+    ),
+    'primary key' => array('fid'),
+    'indexes' => array('weight' => array('weight')),
+  );
+  $schema['filter_formats'] = array(
+    'fields' => array(
+      'format' => array('type' => 'serial', 'not null' => TRUE),
+      'name'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'roles'  => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'cache'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
+    ),
+    'unique keys' => array('name' => array('name')),
+    'primary key' => array('format'),
+  );
+
+  $schema['cache_filter'] = drupal_get_schema_unprocessed('system', 'cache');
+
+  return $schema;
+}
Index: modules/dblog/dblog.schema
===================================================================
--- modules/dblog/dblog.schema	(revision 4)
+++ modules/dblog/dblog.schema	(working copy)
@@ -1,25 +0,0 @@
-<?php
-// $Id: dblog.schema,v 1.2 2007/05/30 08:34:12 dries Exp $
-
-function dblog_schema() {
-  $schema['watchdog'] = array(
-    'fields' => array(
-      'wid'       => array('type' => 'serial', 'not null' => TRUE),
-      'uid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'type'      => array('type' => 'varchar', 'length' => 16, 'not null' => TRUE, 'default' => ''),
-      'message'   => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
-      'variables' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
-      'severity'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'link'      => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'location'  => array('type' => 'text', 'not null' => TRUE),
-      'referer'   => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'hostname'  => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
-    ),
-    'primary key' => array('wid'),
-    'indexes' => array('type' => array('type')),
-  );
-
-  return $schema;
-}
-
Index: modules/dblog/dblog.install
===================================================================
--- modules/dblog/dblog.install	(revision 4)
+++ modules/dblog/dblog.install	(working copy)
@@ -2,6 +2,32 @@
 // $Id: dblog.install,v 1.3 2007/05/25 12:46:44 dries Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function dblog_schema() {
+  $schema['watchdog'] = array(
+    'fields' => array(
+      'wid'       => array('type' => 'serial', 'not null' => TRUE),
+      'uid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'type'      => array('type' => 'varchar', 'length' => 16, 'not null' => TRUE, 'default' => ''),
+      'message'   => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
+      'variables' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
+      'severity'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'link'      => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'location'  => array('type' => 'text', 'not null' => TRUE),
+      'referer'   => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'hostname'  => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
+    ),
+    'primary key' => array('wid'),
+    'indexes' => array('type' => array('type')),
+  );
+
+  return $schema;
+}
+
+
+/**
  * Implementation of hook_install().
  */
 function dblog_install() {
Index: modules/forum/forum.schema
===================================================================
--- modules/forum/forum.schema	(revision 4)
+++ modules/forum/forum.schema	(working copy)
@@ -1,20 +0,0 @@
-<?php
-// $Id: forum.schema,v 1.1 2007/05/25 12:46:44 dries Exp $
-
-function forum_schema() {
-  $schema['forum'] = array(
-    'fields' => array(
-      'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
-    ),
-    'indexes' => array(
-      'nid' => array('nid'),
-      'tid' => array('tid')
-    ),
-    'primary key' => array('vid'),
-  );
-
-  return $schema;
-}
-
Index: modules/forum/forum.install
===================================================================
--- modules/forum/forum.install	(revision 4)
+++ modules/forum/forum.install	(working copy)
@@ -2,6 +2,26 @@
 // $Id: forum.install,v 1.7 2007/05/25 12:46:44 dries Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function forum_schema() {
+  $schema['forum'] = array(
+    'fields' => array(
+      'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'tid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
+    ),
+    'indexes' => array(
+      'nid' => array('nid'),
+      'tid' => array('tid')
+    ),
+    'primary key' => array('vid'),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function forum_install() {
Index: modules/block/block.install
===================================================================
--- modules/block/block.install	(revision 0)
+++ modules/block/block.install	(revision 0)
@@ -0,0 +1,52 @@
+<?php
+// $Id$
+
+/**
+ * Implementation of hook_schema().
+ */
+function block_schema() {
+  $schema['blocks'] = array(
+    'fields' => array(
+      'bid'        => array('type' => 'serial', 'not null' => TRUE),
+      'module'     => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
+      'delta'      => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => '0'),
+      'theme'      => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'status'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'weight'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'region'     => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => 'left'),
+      'custom'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'throttle'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'visibility' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'pages'      => array('type' => 'text', 'not null' => TRUE),
+      'title'      => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '')
+    ),
+    'primary key' => array('bid'),
+  );
+
+  $schema['blocks_roles'] = array(
+    'fields' => array(
+      'module' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE),
+      'delta'  => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE),
+      'rid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE)
+    ),
+    'primary key' => array(
+      'module',
+      'delta',
+      'rid'
+    ),
+  );
+
+  $schema['boxes'] = array(
+    'fields' => array(
+      'bid'    => array('type' => 'serial', 'not null' => TRUE),
+      'body'   => array('type' => 'text', 'not null' => FALSE, 'size' => 'big'),
+      'info'   => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'format' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0)
+    ),
+    'unique keys' => array('info' => array('info')),
+    'primary key' => array('bid'),
+  );
+
+  return $schema;
+}
+
Index: modules/block/block.schema
===================================================================
--- modules/block/block.schema	(revision 4)
+++ modules/block/block.schema	(working copy)
@@ -1,49 +0,0 @@
-<?php
-// $Id: block.schema,v 1.1 2007/05/25 12:46:43 dries Exp $
-
-function block_schema() {
-  $schema['blocks'] = array(
-    'fields' => array(
-      'bid'        => array('type' => 'serial', 'not null' => TRUE),
-      'module'     => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
-      'delta'      => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => '0'),
-      'theme'      => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'status'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'weight'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'region'     => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => 'left'),
-      'custom'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'throttle'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'visibility' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'pages'      => array('type' => 'text', 'not null' => TRUE),
-      'title'      => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '')
-    ),
-    'primary key' => array('bid'),
-  );
-
-  $schema['blocks_roles'] = array(
-    'fields' => array(
-      'module' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE),
-      'delta'  => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE),
-      'rid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE)
-    ),
-    'primary key' => array(
-      'module',
-      'delta',
-      'rid'
-    ),
-  );
-
-  $schema['boxes'] = array(
-    'fields' => array(
-      'bid'    => array('type' => 'serial', 'not null' => TRUE),
-      'body'   => array('type' => 'text', 'not null' => FALSE, 'size' => 'big'),
-      'info'   => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'format' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0)
-    ),
-    'unique keys' => array('info' => array('info')),
-    'primary key' => array('bid'),
-  );
-
-  return $schema;
-}
-
Index: modules/contact/contact.install
===================================================================
--- modules/contact/contact.install	(revision 4)
+++ modules/contact/contact.install	(working copy)
@@ -2,6 +2,26 @@
 // $Id: contact.install,v 1.7 2007/05/25 12:46:44 dries Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function contact_schema() {
+  $schema['contact'] = array(
+    'fields' => array(
+      'cid'        => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'category'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'recipients' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
+      'reply'      => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
+      'weight'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'selected'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
+    ),
+    'unique keys' => array('category' => array('category')),
+    'primary key' => array('cid'),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function contact_install() {
Index: modules/contact/contact.schema
===================================================================
--- modules/contact/contact.schema	(revision 4)
+++ modules/contact/contact.schema	(working copy)
@@ -1,20 +0,0 @@
-<?php
-// $Id: contact.schema,v 1.2 2007/06/15 07:15:24 dries Exp $
-
-function contact_schema() {
-  $schema['contact'] = array(
-    'fields' => array(
-      'cid'        => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'category'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'recipients' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'),
-      'reply'      => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
-      'weight'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'selected'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
-    ),
-    'unique keys' => array('category' => array('category')),
-    'primary key' => array('cid'),
-  );
-
-  return $schema;
-}
-
Index: modules/profile/profile.schema
===================================================================
--- modules/profile/profile.schema	(revision 4)
+++ modules/profile/profile.schema	(working copy)
@@ -1,40 +0,0 @@
-<?php
-// $Id: profile.schema,v 1.1 2007/05/25 12:46:45 dries Exp $
-
-function profile_schema() {
-  $schema['profile_fields'] = array(
-    'fields' => array(
-      'fid'          => array('type' => 'serial', 'not null' => TRUE),
-      'title'        => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
-      'name'         => array('type' => 'varchar', 'length' => 128, 'not null' => FALSE),
-      'explanation'  => array('type' => 'text', 'not null' => FALSE),
-      'category'     => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
-      'page'         => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
-      'type'         => array('type' => 'varchar', 'length' => 128, 'not null' => FALSE),
-      'weight'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'required'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'register'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'visibility'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'autocomplete' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'options'      => array('type' => 'text', 'not null' => FALSE)
-    ),
-    'indexes' => array('category' => array('category')),
-    'unique keys' => array('name' => array('name')),
-    'primary key' => array('fid'),
-  );
-
-  $schema['profile_values'] = array(
-    'fields' => array(
-      'fid'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0),
-      'uid'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0),
-      'value' => array('type' => 'text', 'not null' => FALSE)
-    ),
-    'indexes' => array(
-      'fid' => array('fid'),
-      'uid' => array('uid')
-    ),
-  );
-
-  return $schema;
-}
-
Index: modules/profile/profile.install
===================================================================
--- modules/profile/profile.install	(revision 4)
+++ modules/profile/profile.install	(working copy)
@@ -2,6 +2,46 @@
 // $Id: profile.install,v 1.9 2007/05/25 12:46:45 dries Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function profile_schema() {
+  $schema['profile_fields'] = array(
+    'fields' => array(
+      'fid'          => array('type' => 'serial', 'not null' => TRUE),
+      'title'        => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
+      'name'         => array('type' => 'varchar', 'length' => 128, 'not null' => FALSE),
+      'explanation'  => array('type' => 'text', 'not null' => FALSE),
+      'category'     => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
+      'page'         => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE),
+      'type'         => array('type' => 'varchar', 'length' => 128, 'not null' => FALSE),
+      'weight'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'required'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'register'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'visibility'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'autocomplete' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'options'      => array('type' => 'text', 'not null' => FALSE)
+    ),
+    'indexes' => array('category' => array('category')),
+    'unique keys' => array('name' => array('name')),
+    'primary key' => array('fid'),
+  );
+
+  $schema['profile_values'] = array(
+    'fields' => array(
+      'fid'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0),
+      'uid'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0),
+      'value' => array('type' => 'text', 'not null' => FALSE)
+    ),
+    'indexes' => array(
+      'fid' => array('fid'),
+      'uid' => array('uid')
+    ),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function profile_install() {
Index: modules/actions/actions.schema
===================================================================
--- modules/actions/actions.schema	(revision 4)
+++ modules/actions/actions.schema	(working copy)
@@ -1,26 +0,0 @@
-<?php
-// $Id: actions.schema,v 1.1 2007/06/29 18:06:50 dries Exp $
-
-function actions_schema() {
-  $schema['actions'] = array(
-    'fields' => array(
-      'aid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '0'),
-      'type' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
-      'callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'parameters' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big', 'default' => ''),
-      'description' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '0'),
-    ),
-    'primary key' => array('aid'),
-  );
-  $schema['actions_assignments'] = array(
-    'fields' => array(
-      'hook' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
-      'op' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
-      'aid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-    ),
-    'index keys' => array(
-      'hook_op' => array('hook', 'op'))
-  );
-  return $schema;
-}
Index: modules/actions/actions.install
===================================================================
--- modules/actions/actions.install	(revision 4)
+++ modules/actions/actions.install	(working copy)
@@ -2,6 +2,33 @@
 // $Id: actions.install,v 1.1 2007/06/29 18:06:50 dries Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function actions_schema() {
+  $schema['actions'] = array(
+    'fields' => array(
+      'aid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '0'),
+      'type' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
+      'callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'parameters' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big', 'default' => ''),
+      'description' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '0'),
+    ),
+    'primary key' => array('aid'),
+  );
+  $schema['actions_assignments'] = array(
+    'fields' => array(
+      'hook' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
+      'op' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
+      'aid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+    ),
+    'index keys' => array(
+      'hook_op' => array('hook', 'op'))
+  );
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function actions_install() {
Index: modules/comment/comment.schema
===================================================================
--- modules/comment/comment.schema	(revision 4)
+++ modules/comment/comment.schema	(working copy)
@@ -1,45 +0,0 @@
-<?php
-// $Id: comment.schema,v 1.2 2007/06/15 07:15:24 dries Exp $
-
-function comment_schema() {
-  $schema['comments'] = array(
-    'fields' => array(
-      'cid'       => array('type' => 'serial', 'not null' => TRUE),
-      'pid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'nid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'uid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'subject'   => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
-      'comment'   => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
-      'hostname'  => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'score'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'medium'),
-      'status'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'format'    => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0),
-      'thread'    => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE),
-      'users'     => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium'),
-      'name'      => array('type' => 'varchar', 'length' => 60, 'not null' => FALSE),
-      'mail'      => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE),
-      'homepage'  => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE)
-    ),
-    'indexes' => array(
-      'nid'    => array('nid'),
-      'status' => array('status')
-    ),
-    'primary key' => array('cid'),
-  );
-
-  $schema['node_comment_statistics'] = array(
-    'fields' => array(
-      'nid'                    => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'last_comment_timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'last_comment_name'      => array('type' => 'varchar', 'length' => 60, 'not null' => FALSE),
-      'last_comment_uid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'comment_count'          => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
-    ),
-    'indexes' => array('node_comment_timestamp' => array('last_comment_timestamp')),
-    'primary key' => array('nid'),
-  );
-
-  return $schema;
-}
-
Index: modules/comment/comment.install
===================================================================
--- modules/comment/comment.install	(revision 4)
+++ modules/comment/comment.install	(working copy)
@@ -2,6 +2,53 @@
 // $Id: comment.install,v 1.2 2006/12/13 22:44:54 unconed Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function comment_schema() {
+  $schema['comments'] = array(
+    'fields' => array(
+      'cid'       => array('type' => 'serial', 'not null' => TRUE),
+      'pid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'nid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'uid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'subject'   => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),
+      'comment'   => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
+      'hostname'  => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'score'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'medium'),
+      'status'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'format'    => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0),
+      'thread'    => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE),
+      'users'     => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium'),
+      'name'      => array('type' => 'varchar', 'length' => 60, 'not null' => FALSE),
+      'mail'      => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE),
+      'homepage'  => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE)
+    ),
+    'indexes' => array(
+      'nid'    => array('nid'),
+      'status' => array('status')
+    ),
+    'primary key' => array('cid'),
+  );
+
+  $schema['node_comment_statistics'] = array(
+    'fields' => array(
+      'nid'                    => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'last_comment_timestamp' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'last_comment_name'      => array('type' => 'varchar', 'length' => 60, 'not null' => FALSE),
+      'last_comment_uid'       => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'comment_count'          => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
+    ),
+    'indexes' => array('node_comment_timestamp' => array('last_comment_timestamp')),
+    'primary key' => array('nid'),
+  );
+
+  return $schema;
+}
+
+
+
+/**
  * Implementation of hook_enable().
  */
 function comment_enable() {
Index: modules/poll/poll.schema
===================================================================
--- modules/poll/poll.schema	(revision 4)
+++ modules/poll/poll.schema	(working copy)
@@ -1,42 +0,0 @@
-<?php
-// $Id: poll.schema,v 1.1 2007/05/25 12:46:45 dries Exp $
-
-function poll_schema() {
-  $schema['poll'] = array(
-    'fields' => array(
-      'nid'     => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'runtime' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'active'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
-    ),
-    'primary key' => array('nid'),
-  );
-
-  $schema['poll_choices'] = array(
-    'fields' => array(
-      'chid'    => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'nid'     => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'chtext'  => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'chvotes' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'chorder' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
-    ),
-    'indexes' => array('nid' => array('nid')),
-    'primary key' => array('chid'),
-  );
-
-  $schema['poll_votes'] = array(
-    'fields' => array(
-      'nid'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
-      'uid'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'chorder'  => array('type' => 'int', 'not null' => TRUE, 'default' => -1),
-      'hostname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '')
-    ),
-    'indexes' => array(
-      'hostname' => array('hostname'),
-      'nid'      => array('nid'),
-      'uid'      => array('uid')
-    ),
-  );
-
-  return $schema;
-}
-
Index: modules/poll/poll.install
===================================================================
--- modules/poll/poll.install	(revision 4)
+++ modules/poll/poll.install	(working copy)
@@ -2,6 +2,48 @@
 // $Id: poll.install,v 1.8 2007/05/25 12:46:45 dries Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function poll_schema() {
+  $schema['poll'] = array(
+    'fields' => array(
+      'nid'     => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'runtime' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'active'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
+    ),
+    'primary key' => array('nid'),
+  );
+
+  $schema['poll_choices'] = array(
+    'fields' => array(
+      'chid'    => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'nid'     => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'chtext'  => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'chvotes' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'chorder' => array('type' => 'int', 'not null' => TRUE, 'default' => 0)
+    ),
+    'indexes' => array('nid' => array('nid')),
+    'primary key' => array('chid'),
+  );
+
+  $schema['poll_votes'] = array(
+    'fields' => array(
+      'nid'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
+      'uid'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'chorder'  => array('type' => 'int', 'not null' => TRUE, 'default' => -1),
+      'hostname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '')
+    ),
+    'indexes' => array(
+      'hostname' => array('hostname'),
+      'nid'      => array('nid'),
+      'uid'      => array('uid')
+    ),
+  );
+
+  return $schema;
+}
+
+/**
  * Implementation of hook_install().
  */
 function poll_install() {
Index: modules/user/user.install
===================================================================
--- modules/user/user.install	(revision 0)
+++ modules/user/user.install	(revision 0)
@@ -0,0 +1,87 @@
+<?php
+// $Id$
+
+/**
+ * Implementation of hook_schema().
+ */
+function user_schema() {
+  $schema['access'] = array(
+    'fields' => array(
+      'aid'    => array('type' => 'serial', 'not null' => TRUE),
+      'mask'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'type'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
+    ),
+    'primary key' => array('aid'),
+  );
+
+  $schema['authmap'] = array(
+    'fields' => array(
+      'aid'      => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'uid'      => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'authname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'module'   => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '')
+    ),
+    'unique keys' => array('authname' => array('authname')),
+    'primary key' => array('aid'),
+  );
+
+  $schema['permission'] = array(
+    'fields' => array(
+      'pid'  => array('type' => 'serial', 'not null' => TRUE),
+      'rid'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'perm' => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium'),
+      'tid'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
+    ),
+    'primary key' => array('pid'),
+    'indexes' => array('rid' => array('rid')),
+  );
+
+  $schema['role'] = array(
+    'fields' => array(
+      'rid'  => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'name' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '')
+    ),
+    'unique keys' => array('name' => array('name')),
+    'primary key' => array('rid'),
+  );
+
+  $schema['users'] = array(
+    'fields' => array(
+      'uid'       => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
+      'name'      => array('type' => 'varchar', 'length' => 60, 'not null' => TRUE, 'default' => ''),
+      'pass'      => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
+      'mail'      => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE, 'default' => ''),
+      'mode'      => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'sort'      => array('type' => 'int', 'not null' => FALSE, 'default' => 0, 'size' => 'tiny'),
+      'threshold' => array('type' => 'int', 'not null' => FALSE, 'default' => 0, 'size' => 'tiny'),
+      'theme'     => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'signature' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'created'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'access'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'login'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      'status'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
+      'timezone'  => array('type' => 'varchar', 'length' => 8, 'not null' => FALSE),
+      'language'  => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''),
+      'picture'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+      'init'      => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE, 'default' => ''),
+      'data'      => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium')
+    ),
+    'indexes' => array(
+      'access'  => array('access'),
+      'created' => array('created')
+    ),
+    'unique keys' => array('name' => array('name')),
+    'primary key' => array('uid'),
+  );
+
+  $schema['users_roles'] = array(
+    'fields' => array(
+      'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'rid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
+    ),
+    'primary key' => array('uid', 'rid'),
+  );
+
+  return $schema;
+}
Index: modules/user/user.schema
===================================================================
--- modules/user/user.schema	(revision 4)
+++ modules/user/user.schema	(working copy)
@@ -1,85 +0,0 @@
-<?php
-// $Id: user.schema,v 1.2 2007/06/15 07:15:25 dries Exp $
-
-function user_schema() {
-  $schema['access'] = array(
-    'fields' => array(
-      'aid'    => array('type' => 'serial', 'not null' => TRUE),
-      'mask'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'type'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny')
-    ),
-    'primary key' => array('aid'),
-  );
-
-  $schema['authmap'] = array(
-    'fields' => array(
-      'aid'      => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'uid'      => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'authname' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
-      'module'   => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '')
-    ),
-    'unique keys' => array('authname' => array('authname')),
-    'primary key' => array('aid'),
-  );
-
-  $schema['permission'] = array(
-    'fields' => array(
-      'pid'  => array('type' => 'serial', 'not null' => TRUE),
-      'rid'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'perm' => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium'),
-      'tid'  => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
-    ),
-    'primary key' => array('pid'),
-    'indexes' => array('rid' => array('rid')),
-  );
-
-  $schema['role'] = array(
-    'fields' => array(
-      'rid'  => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'name' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '')
-    ),
-    'unique keys' => array('name' => array('name')),
-    'primary key' => array('rid'),
-  );
-
-  $schema['users'] = array(
-    'fields' => array(
-      'uid'       => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'name'      => array('type' => 'varchar', 'length' => 60, 'not null' => TRUE, 'default' => ''),
-      'pass'      => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
-      'mail'      => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE, 'default' => ''),
-      'mode'      => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'sort'      => array('type' => 'int', 'not null' => FALSE, 'default' => 0, 'size' => 'tiny'),
-      'threshold' => array('type' => 'int', 'not null' => FALSE, 'default' => 0, 'size' => 'tiny'),
-      'theme'     => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'signature' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'created'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'access'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'login'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'status'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'),
-      'timezone'  => array('type' => 'varchar', 'length' => 8, 'not null' => FALSE),
-      'language'  => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''),
-      'picture'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'init'      => array('type' => 'varchar', 'length' => 64, 'not null' => FALSE, 'default' => ''),
-      'data'      => array('type' => 'text', 'not null' => FALSE, 'size' => 'medium')
-    ),
-    'indexes' => array(
-      'access'  => array('access'),
-      'created' => array('created')
-    ),
-    'unique keys' => array('name' => array('name')),
-    'primary key' => array('uid'),
-  );
-
-  $schema['users_roles'] = array(
-    'fields' => array(
-      'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
-      'rid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0)
-    ),
-    'primary key' => array('uid', 'rid'),
-  );
-
-  return $schema;
-}
-
