Index: modules/aggregator/aggregator.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.install,v
retrieving revision 1.11
diff -u -r1.11 aggregator.install
--- modules/aggregator/aggregator.install	10 Oct 2007 11:39:32 -0000	1.11
+++ modules/aggregator/aggregator.install	1 Nov 2007 12:31:24 -0000
@@ -75,7 +75,8 @@
         'description' => t('The {aggregator_category}.cid to which the feed is being assigned.'),
      )
     ),
-    'primary key' => array('fid', 'cid'),
+    'primary key' => array('cid', 'fid'),
+    'indexes' => array('fid' => array('fid')),
   );
 
   $schema['aggregator_category_item'] = array(
@@ -171,11 +172,11 @@
         'description' => t("Number of items to display in the feed's block."),
       )
     ),
+    'primary key' => array('fid'),
     'unique keys' => array(
       'url'  => array('url'),
       'title' => array('title')
     ),
-    'primary key' => array('fid'),
   );
 
   $schema['aggregator_item'] = array(
@@ -231,8 +232,8 @@
         'description' => t('Unique identifier for the feed item.'),
       )
     ),
-    'indexes' => array('fid' => array('fid')),
     'primary key' => array('iid'),
+    'indexes' => array('fid' => array('fid')),
   );
 
   return $schema;
Index: modules/block/block.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.install,v
retrieving revision 1.4
diff -u -r1.4 block.install
--- modules/block/block.install	21 Oct 2007 18:59:01 -0000	1.4
+++ modules/block/block.install	1 Nov 2007 12:31:29 -0000
@@ -8,11 +8,6 @@
   $schema['blocks'] = array(
     'description' => t('Stores block settings, such as region and visibility settings.'),
     'fields' => array(
-      'bid' => array(
-        'type' => 'serial',
-        'not null' => TRUE,
-        'description' => t('Primary Key: Unique block ID.'),
-      ),
       'module' => array(
         'type' => 'varchar',
         'length' => 64,
@@ -96,7 +91,7 @@
         'description' => t('Binary flag to indicate block cache mode. (-1: Do not cache, 1: Cache per role, 2: Cache per user, 4: Cache per page, 8: Block cache global) See BLOCK_CACHE_* constants in block.module for more detailed information.'),
       ),
     ),
-    'primary key' => array('bid'),
+    'primary key' => array('module', 'delta'),
   );
 
   $schema['blocks_roles'] = array(
Index: modules/filter/filter.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.install,v
retrieving revision 1.2
diff -u -r1.2 filter.install
--- modules/filter/filter.install	10 Oct 2007 11:39:32 -0000	1.2
+++ modules/filter/filter.install	1 Nov 2007 12:31:32 -0000
@@ -7,12 +7,6 @@
 function filter_schema() {
   $schema['filters'] = array(
     'description' => t('Table that maps filters (HTML corrector) to input formats (Filtered HTML).'),
-    'fields' => array(
-      'fid' => array(
-        'type' => 'serial',
-        'not null' => TRUE,
-        'description' => t('Primary Key: Auto-incrementing filter ID.'),
-      ),
       'format' => array(
         'type' => 'int',
         'not null' => TRUE,
@@ -41,7 +35,7 @@
         'description' => t('Weight of filter within format.'),
       )
     ),
-    'primary key' => array('fid'),
+    'primary key' => array('format', 'module', 'delta'),
     'indexes' => array('weight' => array('weight')),
   );
   $schema['filter_formats'] = array(
@@ -74,8 +68,8 @@
         'description' => t('Flag to indicate whether format is cachable. (1 = cachable, 0 = not cachable)'),
       ),
     ),
-    'unique keys' => array('name' => array('name')),
     'primary key' => array('format'),
+    'unique keys' => array('name' => array('name')),
   );
 
   $schema['cache_filter'] = drupal_get_schema_unprocessed('system', 'cache');
Index: modules/profile/profile.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.install,v
retrieving revision 1.11
diff -u -r1.11 profile.install
--- modules/profile/profile.install	10 Oct 2007 11:39:33 -0000	1.11
+++ modules/profile/profile.install	1 Nov 2007 12:12:39 -0000
@@ -136,9 +136,9 @@
         'description' => t('The value for the field.'),
       ),
     ),
+    'primary key' => array('uid', 'fid'),
     'indexes' => array(
       'fid' => array('fid'),
-      'uid' => array('uid')
     ),
   );
 
Index: modules/taxonomy/taxonomy.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.install,v
retrieving revision 1.4
diff -u -r1.4 taxonomy.install
--- modules/taxonomy/taxonomy.install	21 Oct 2007 18:59:02 -0000	1.4
+++ modules/taxonomy/taxonomy.install	1 Nov 2007 12:31:20 -0000
@@ -43,7 +43,7 @@
       ),
     ),
     'primary key' => array('tid'),
-    'indexes' => array('vid' => array('vid')),
+    'indexes' => array('taxonomy_tree' => array('vid', 'weight', 'name')),
   );
 
   $schema['term_hierarchy'] = array(
@@ -97,21 +97,15 @@
       ),
     ),
     'indexes' => array(
-      'nid' => array('nid'),
       'vid' => array('vid'),
-      'tid' => array('tid'),
+      'nid' => array('nid'),
     ),
-    'primary key' => array('vid', 'tid', 'nid'),
+    'primary key' => array('tid', 'vid'),
   );
 
   $schema['term_relation'] = array(
     'description' => t('Stores non-hierarchical relationships between terms.'),
     'fields' => array(
-      'trid' => array(
-        'type' => 'serial',
-        'not null' => TRUE,
-        'description' => t('Primary Key: Unique term relation ID.'),
-      ),
       'tid1' => array(
         'type' => 'int',
         'unsigned' => TRUE,
@@ -128,20 +122,14 @@
       ),
     ),
     'indexes' => array(
-      'tid1' => array('tid1'),
       'tid2' => array('tid2'),
     ),
-    'primary key' => array('trid'),
+    'primary key' => array('tid1', 'tid2'),
   );
 
   $schema['term_synonym'] = array(
     'description' => t('Stores term synonyms.'),
     'fields' => array(
-      'tsid' => array(
-        'type' => 'serial',
-        'not null' => TRUE,
-        'description' => t('Primary Key: Unique term synonym ID.'),
-      ),
       'tid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
@@ -159,9 +147,8 @@
     ),
     'indexes' => array(
       'name' => array(array('name', 3)),
-      'tid' => array('tid'),
     ),
-    'primary key' => array('tsid'),
+    'primary key' => array('tid', 'name'),
   );
 
   $schema['vocabulary'] = array(
@@ -269,6 +256,7 @@
       ),
     ),
     'primary key' => array('vid', 'type'),
+    'unique keys' => array('name' => 'name'),
   );
 
   return $schema;
