Index: drupal/modules/system/system.schema
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.schema,v
retrieving revision 1.11
diff -u -p -r1.11 system.schema
--- drupal/modules/system/system.schema	29 Aug 2007 20:46:18 -0000	1.11
+++ drupal/modules/system/system.schema	31 Aug 2007 19:27:45 -0000
@@ -2,6 +2,17 @@
 // $Id: system.schema,v 1.11 2007/08/29 20:46:18 goba Exp $
 
 function system_schema() {
+  // NOTE: {variable} needs to be created before all other tables, as
+  // some database drivers, e.g. Oracle and DB2, will require variable_get()
+  // and variable_set() for overcoming some database specific limitations.
+  $schema['variable'] = array(
+    'fields' => array(
+      'name'     => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''),
+      'value'    => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
+    ),
+    'primary key' => array('name'),
+  );
+
   $schema['actions'] = array(
     'fields' => array(
       'aid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '0'),
@@ -205,13 +216,5 @@ function system_schema() {
     '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' => 'big'),
-    ),
-    'primary key' => array('name'),
-  );
-
   return $schema;
 }
