Index: includes/database.mysql-common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database.mysql-common.inc,v
retrieving revision 1.19
diff -u -r1.19 database.mysql-common.inc
--- includes/database.mysql-common.inc	14 Apr 2008 17:48:33 -0000	1.19
+++ includes/database.mysql-common.inc	1 Jul 2008 05:06:52 -0000
@@ -65,9 +65,9 @@
 
   $sql = "CREATE TABLE {" . $name . "} (\n";
 
-  // Add the SQL statement for each field.
-  foreach ($table['fields'] as $field_name => $field) {
-    $sql .= _db_create_field_sql($field_name, _db_process_field($field)) . ", \n";
+  // Add the SQL statement for each column.
+  foreach ($table['columns'] as $column_name => $column) {
+    $sql .= _db_create_column_sql($column_name, _db_process_column($column)) . ", \n";
   }
 
   // Process keys & indexes.
@@ -91,69 +91,69 @@
     $keys[] = 'PRIMARY KEY (' . _db_create_key_sql($spec['primary key']) . ')';
   }
   if (!empty($spec['unique keys'])) {
-    foreach ($spec['unique keys'] as $key => $fields) {
-      $keys[] = 'UNIQUE KEY ' . $key . ' (' . _db_create_key_sql($fields) . ')';
+    foreach ($spec['unique keys'] as $key => $columns) {
+      $keys[] = 'UNIQUE KEY ' . $key . ' (' . _db_create_key_sql($columns) . ')';
     }
   }
   if (!empty($spec['indexes'])) {
-    foreach ($spec['indexes'] as $index => $fields) {
-      $keys[] = 'INDEX ' . $index . ' (' . _db_create_key_sql($fields) . ')';
+    foreach ($spec['indexes'] as $index => $columns) {
+      $keys[] = 'INDEX ' . $index . ' (' . _db_create_key_sql($columns) . ')';
     }
   }
 
   return $keys;
 }
 
-function _db_create_key_sql($fields) {
+function _db_create_key_sql($columns) {
   $ret = array();
-  foreach ($fields as $field) {
-    if (is_array($field)) {
-      $ret[] = $field[0] . '(' . $field[1] . ')';
+  foreach ($columns as $column) {
+    if (is_array($column)) {
+      $ret[] = $column[0] . '(' . $column[1] . ')';
     }
     else {
-      $ret[] = $field;
+      $ret[] = $column;
     }
   }
   return implode(', ', $ret);
 }
 
 /**
- * Set database-engine specific properties for a field.
+ * Set database-engine specific properties for a column.
  *
- * @param $field
- *   A field description array, as specified in the schema documentation.
+ * @param $column
+ *   A column description array, as specified in the schema documentation.
  */
-function _db_process_field($field) {
+function _db_process_column($column) {
 
-  if (!isset($field['size'])) {
-    $field['size'] = 'normal';
+  if (!isset($column['size'])) {
+    $column['size'] = 'normal';
   }
 
   // Set the correct database-engine specific datatype.
-  if (!isset($field['mysql_type'])) {
+  if (!isset($column['mysql_type'])) {
     $map = db_type_map();
-    $field['mysql_type'] = $map[$field['type'] . ':' . $field['size']];
+    $column['mysql_type'] = $map[$column['type'] . ':' . $column['size']];
   }
 
-  if ($field['type'] == 'serial') {
-    $field['auto_increment'] = TRUE;
+  if ($column['type'] == 'serial') {
+    $column['auto_increment'] = TRUE;
   }
 
-  return $field;
+  return $column;
 }
 
 /**
- * Create an SQL string for a field to be used in table creation or alteration.
+ * Create an SQL string for a column to be used in table creation or alteration.
  *
- * Before passing a field out of a schema definition into this function it has
- * to be processed by _db_process_field().
+ * Before passing a column out of a schema definition into this function it has
+ * to be processed by _db_process_column().
  *
  * @param $name
- *    Name of the field.
+ *    Name of the column.
  * @param $spec
- *    The field specification, as per the schema data structure format.
+ *    The column specification, as per the schema data structure format.
  */
-function _db_create_field_sql($name, $spec) {
+function _db_create_column_sql($name, $spec) {
   $sql = "`" . $name . "` " . $spec['mysql_type'];
 
   if (isset($spec['length'])) {
@@ -262,79 +262,79 @@
 }
 
 /**
- * Add a new field to a table.
+ * Add a new column to a table.
  *
  * @param $ret
  *   Array to which query results will be added.
  * @param $table
  *   Name of the table to be altered.
- * @param $field
- *   Name of the field to be added.
+ * @param $column
+ *   Name of the column to be added.
  * @param $spec
- *   The field specification array, as taken from a schema definition.
+ *   The column specification array, as taken from a schema definition.
  *   The specification may also contain the key 'initial', the newly
- *   created field will be set to the value of the key in all rows.
+ *   created column will be set to the value of the key in all rows.
  *   This is most useful for creating NOT NULL columns with no default
  *   value in existing tables.
  * @param $keys_new
  *   Optional keys and indexes specification to be created on the
- *   table along with adding the field. The format is the same as a
- *   table specification but without the 'fields' element.  If you are
- *   adding a type 'serial' field, you MUST specify at least one key
- *   or index including it in this array. @see db_change_field for more
+ *   table along with adding the column. The format is the same as a
+ *   table specification but without the 'columns' element.  If you are
+ *   adding a type 'serial' column, you MUST specify at least one key
+ *   or index including it in this array. @see db_change_column for more
  *   explanation why.
  */
-function db_add_field(&$ret, $table, $field, $spec, $keys_new = array()) {
+function db_add_column(&$ret, $table, $column, $spec, $keys_new = array()) {
   $fixnull = FALSE;
   if (!empty($spec['not null']) && !isset($spec['default'])) {
     $fixnull = TRUE;
     $spec['not null'] = FALSE;
   }
   $query = 'ALTER TABLE {' . $table . '} ADD ';
-  $query .= _db_create_field_sql($field, _db_process_field($spec));
+  $query .= _db_create_column_sql($column, _db_process_column($spec));
   if (count($keys_new)) {
     $query .= ', ADD ' . implode(', ADD ', _db_create_keys_sql($keys_new));
   }
   $ret[] = update_sql($query);
   if (isset($spec['initial'])) {
     // All this because update_sql does not support %-placeholders.
-    $sql = 'UPDATE {' . $table . '} SET ' . $field . ' = ' . db_type_placeholder($spec['type']);
+    $sql = 'UPDATE {' . $table . '} SET ' . $column . ' = ' . db_type_placeholder($spec['type']);
     $result = db_query($sql, $spec['initial']);
     $ret[] = array('success' => $result !== FALSE, 'query' => check_plain($sql . ' (' . $spec['initial'] . ')'));
   }
   if ($fixnull) {
     $spec['not null'] = TRUE;
-    db_change_field($ret, $table, $field, $field, $spec);
+    db_change_column($ret, $table, $column, $column, $spec);
   }
 }
 
 /**
- * Drop a field.
+ * Drop a column.
  *
  * @param $ret
  *   Array to which query results will be added.
  * @param $table
  *   The table to be altered.
- * @param $field
- *   The field to be dropped.
+ * @param $column
+ *   The column to be dropped.
  */
-function db_drop_field(&$ret, $table, $field) {
-  $ret[] = update_sql('ALTER TABLE {' . $table . '} DROP ' . $field);
+function db_drop_column(&$ret, $table, $column) {
+  $ret[] = update_sql('ALTER TABLE {' . $table . '} DROP ' . $column);
 }
 
 /**
- * Set the default value for a field.
+ * Set the default value for a column.
  *
  * @param $ret
  *   Array to which query results will be added.
  * @param $table
  *   The table to be altered.
- * @param $field
- *   The field to be altered.
+ * @param $column
+ *   The column to be altered.
  * @param $default
  *   Default value to be set. NULL for 'default NULL'.
  */
-function db_field_set_default(&$ret, $table, $field, $default) {
+function db_column_set_default(&$ret, $table, $column, $default) {
   if ($default == NULL) {
     $default = 'NULL';
   }
@@ -342,21 +342,21 @@
     $default = is_string($default) ? "'$default'" : $default;
   }
 
-  $ret[] = update_sql('ALTER TABLE {' . $table . '} ALTER COLUMN ' . $field . ' SET DEFAULT ' . $default);
+  $ret[] = update_sql('ALTER TABLE {' . $table . '} ALTER COLUMN ' . $column . ' SET DEFAULT ' . $default);
 }
 
 /**
- * Set a field to have no default value.
+ * Set a column to have no default value.
  *
  * @param $ret
  *   Array to which query results will be added.
  * @param $table
  *   The table to be altered.
- * @param $field
- *   The field to be altered.
+ * @param $column
+ *   The column to be altered.
  */
-function db_field_set_no_default(&$ret, $table, $field) {
-  $ret[] = update_sql('ALTER TABLE {' . $table . '} ALTER COLUMN ' . $field . ' DROP DEFAULT');
+function db_column_set_no_default(&$ret, $table, $column) {
+  $ret[] = update_sql('ALTER TABLE {' . $table . '} ALTER COLUMN ' . $column . ' DROP DEFAULT');
 }
 
 /**
@@ -366,12 +366,12 @@
  *   Array to which query results will be added.
  * @param $table
  *   The table to be altered.
- * @param $fields
+ * @param $columns
  *   Fields for the primary key.
  */
-function db_add_primary_key(&$ret, $table, $fields) {
+function db_add_primary_key(&$ret, $table, $columns) {
   $ret[] = update_sql('ALTER TABLE {' . $table . '} ADD PRIMARY KEY (' .
-    _db_create_key_sql($fields) . ')');
+    _db_create_key_sql($columns) . ')');
 }
 
 /**
@@ -395,12 +395,12 @@
  *   The table to be altered.
  * @param $name
  *   The name of the key.
- * @param $fields
- *   An array of field names.
+ * @param $columns
+ *   An array of column names.
  */
-function db_add_unique_key(&$ret, $table, $name, $fields) {
+function db_add_unique_key(&$ret, $table, $name, $columns) {
   $ret[] = update_sql('ALTER TABLE {' . $table . '} ADD UNIQUE KEY ' .
-    $name . ' (' . _db_create_key_sql($fields) . ')');
+    $name . ' (' . _db_create_key_sql($columns) . ')');
 }
 
 /**
@@ -426,11 +426,11 @@
  *   The table to be altered.
  * @param $name
  *   The name of the index.
- * @param $fields
- *   An array of field names.
+ * @param $columns
+ *   An array of column names.
  */
-function db_add_index(&$ret, $table, $name, $fields) {
-  $query = 'ALTER TABLE {' . $table . '} ADD INDEX ' . $name . ' (' . _db_create_key_sql($fields) . ')';
+function db_add_index(&$ret, $table, $name, $columns) {
+  $query = 'ALTER TABLE {' . $table . '} ADD INDEX ' . $name . ' (' . _db_create_key_sql($columns) . ')';
   $ret[] = update_sql($query);
 }
 
@@ -449,20 +449,20 @@
 }
 
 /**
- * Change a field definition.
+ * Change a column definition.
  *
  * IMPORTANT NOTE: To maintain database portability, you have to explicitly
- * recreate all indices and primary keys that are using the changed field.
+ * recreate all indices and primary keys that are using the changed column.
  *
  * That means that you have to drop all affected keys and indexes with
- * db_drop_{primary_key,unique_key,index}() before calling db_change_field().
+ * db_drop_{primary_key,unique_key,index}() before calling db_change_column().
  * To recreate the keys and indices, pass the key definitions as the
- * optional $keys_new argument directly to db_change_field().
+ * optional $keys_new argument directly to db_change_column().
  *
  * For example, suppose you have:
  * @code
  * $schema['foo'] = array(
- *   'fields' => array(
+ *   'columns' => array(
  *     'bar' => array('type' => 'int', 'not null' => TRUE)
  *   ),
  *   'primary key' => array('bar')
@@ -472,48 +472,48 @@
  * primary key.  The correct sequence is:
  * @code
  * db_drop_primary_key($ret, 'foo');
- * db_change_field($ret, 'foo', 'bar', 'bar',
+ * db_change_column($ret, 'foo', 'bar', 'bar',
  *   array('type' => 'serial', 'not null' => TRUE),
  *   array('primary key' => array('bar')));
  * @endcode
  *
  * The reasons for this are due to the different database engines:
  *
- * On PostgreSQL, changing a field definition involves adding a new field
+ * On PostgreSQL, changing a column definition involves adding a new column
  * and dropping an old one which* causes any indices, primary keys and
- * sequences (from serial-type fields) that use the changed field to be dropped.
+ * sequences (from serial-type columns) that use the changed column to be dropped.
  *
- * On MySQL, all type 'serial' fields must be part of at least one key
+ * On MySQL, all type 'serial' columns must be part of at least one key
  * or index as soon as they are created.  You cannot use
  * db_add_{primary_key,unique_key,index}() for this purpose because
  * the ALTER TABLE command will fail to add the column without a key
  * or index specification.  The solution is to use the optional
  * $keys_new argument to create the key or index at the same time as
- * field.
+ * column.
  *
  * You could use db_add_{primary_key,unique_key,index}() in all cases
- * unless you are converting a field to be type serial. You can use
+ * unless you are converting a column to be type serial. You can use
  * the $keys_new argument in all cases.
  *
  * @param $ret
  *   Array to which query results will be added.
  * @param $table
  *   Name of the table.
- * @param $field
- *   Name of the field to change.
- * @param $field_new
- *   New name for the field (set to the same as $field if you don't want to change the name).
+ * @param $column
+ *   Name of the column to change.
+ * @param $column_new
+ *   New name for the column (set to the same as $column if you don't want to change the name).
  * @param $spec
- *   The field specification for the new field.
+ *   The column specification for the new column.
  * @param $keys_new
  *   Optional keys and indexes specification to be created on the
- *   table along with changing the field. The format is the same as a
- *   table specification but without the 'fields' element.
+ *   table along with changing the column. The format is the same as a
+ *   table specification but without the 'columns' element.
  */
 
-function db_change_field(&$ret, $table, $field, $field_new, $spec, $keys_new = array()) {
-  $sql = 'ALTER TABLE {' . $table . '} CHANGE ' . $field . ' ' .
-    _db_create_field_sql($field_new, _db_process_field($spec));
+function db_change_column(&$ret, $table, $column, $column_new, $spec, $keys_new = array()) {
+  $sql = 'ALTER TABLE {' . $table . '} CHANGE ' . $column . ' ' .
+    _db_create_column_sql($column_new, _db_process_column($spec));
   if (count($keys_new)) {
     $sql .= ', ADD ' . implode(', ADD ', _db_create_keys_sql($keys_new));
   }
@@ -525,9 +525,9 @@
  *
  * @param $table
  *   The name of the table you inserted into.
- * @param $field
- *   The name of the autoincrement field.
+ * @param $column
+ *   The name of the autoincrement column.
  */
-function db_last_insert_id($table, $field) {
+function db_last_insert_id($table, $column) {
   return db_result(db_query('SELECT LAST_INSERT_ID()'));
 }
Index: includes/database.mysqli.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database.mysqli.inc,v
retrieving revision 1.57
diff -u -r1.57 database.mysqli.inc
--- includes/database.mysqli.inc	14 Apr 2008 17:48:33 -0000	1.57
+++ includes/database.mysqli.inc	1 Jul 2008 05:06:54 -0000
@@ -139,7 +139,7 @@
  *   A database query result resource, as returned from db_query().
  * @return
  *   An object representing the next row of the result, or FALSE. The attributes
- *   of this object are the table fields selected by the query.
+ *   of this object are the table columns selected by the query.
  */
 function db_fetch_object($result) {
   if ($result) {
@@ -155,8 +155,8 @@
  *   A database query result resource, as returned from db_query().
  * @return
  *   An associative array representing the next row of the result, or FALSE.
- *   The keys of this object are the names of the table fields selected by the
- *   query, and the values are the field values for this result row.
+ *   The keys of this object are the names of the table columns selected by the
+ *   query, and the values are the column values for this result row.
  */
 function db_fetch_array($result) {
   if ($result) {
@@ -166,15 +166,15 @@
 }
 
 /**
- * Return an individual result field from the previous query.
+ * Return an individual result column from the previous query.
  *
- * Only use this function if exactly one field is being selected; otherwise,
+ * Only use this function if exactly one column is being selected; otherwise,
  * use db_fetch_object() or db_fetch_array().
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
  * @return
- *   The resulting field or FALSE.
+ *   The resulting column or FALSE.
  */
 function db_result($result) {
   if ($result && mysqli_num_rows($result) > 0) {
@@ -354,20 +354,20 @@
 }
 
 /**
- * Wraps the given table.field entry with a DISTINCT(). The wrapper is added to
+ * Wraps the given table.column entry with a DISTINCT(). The wrapper is added to
  * the SELECT list entry of the given query and the resulting query is returned.
  * This function only applies the wrapper if a DISTINCT doesn't already exist in
  * the query.
  *
- * @param $table Table containing the field to set as DISTINCT
- * @param $field Field to set as DISTINCT
+ * @param $table Table containing the column to set as DISTINCT
+ * @param $column Field to set as DISTINCT
  * @param $query Query to apply the wrapper to
- * @return SQL query with the DISTINCT wrapper surrounding the given table.field.
+ * @return SQL query with the DISTINCT wrapper surrounding the given table.column.
  */
-function db_distinct_field($table, $field, $query) {
-  $field_to_select = 'DISTINCT(' . $table . '.' . $field . ')';
+function db_distinct_column($table, $column, $query) {
+  $column_to_select = 'DISTINCT(' . $table . '.' . $column . ')';
   // (?<!text) is a negative look-behind (no need to rewrite queries that already use DISTINCT).
-  return preg_replace('/(SELECT.*)(?:' . $table . '\.|\s)(?<!DISTINCT\()(?<!DISTINCT\(' . $table . '\.)' . $field . '(.*FROM )/AUsi', '\1 ' . $field_to_select . '\2', $query);
+  return preg_replace('/(SELECT.*)(?:' . $table . '\.|\s)(?<!DISTINCT\()(?<!DISTINCT\(' . $table . '\.)' . $column . '(.*FROM )/AUsi', '\1 ' . $column_to_select . '\2', $query);
 }
 
 /**
Index: includes/password.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/password.inc,v
retrieving revision 1.3
diff -u -r1.3 password.inc
--- includes/password.inc	26 May 2008 17:12:54 -0000	1.3
+++ includes/password.inc	1 Jul 2008 05:06:56 -0000
@@ -195,7 +195,7 @@
  * @param $password
  *   A plain-text password
  * @param $account
- *   A user object with at least the fields from the {users} table.
+ *   A user object with at least the columns from the {users} table.
  *
  * @return
  *   TRUE or FALSE.
@@ -227,7 +227,7 @@
  * on the fields in $account.
  *
  * @param $account
- *   A user object with at least the fields from the {users} table.
+ *   A user object with at least the columns from the {users} table.
  *
  * @return
  *   TRUE or FALSE.
Index: includes/database.pgsql.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database.pgsql.inc,v
retrieving revision 1.71
diff -u -r1.71 database.pgsql.inc
--- includes/database.pgsql.inc	9 May 2008 19:18:11 -0000	1.71
+++ includes/database.pgsql.inc	1 Jul 2008 05:06:55 -0000
@@ -168,7 +168,7 @@
  *   A database query result resource, as returned from db_query().
  * @return
  *   An object representing the next row of the result, or FALSE. The attributes
- *   of this object are the table fields selected by the query.
+ *   of this object are the table columns selected by the query.
  */
 function db_fetch_object($result) {
   if ($result) {
@@ -183,8 +183,8 @@
  *   A database query result resource, as returned from db_query().
  * @return
  *   An associative array representing the next row of the result, or FALSE.
- *   The keys of this object are the names of the table fields selected by the
- *   query, and the values are the field values for this result row.
+ *   The keys of this object are the names of the table columns selected by the
+ *   query, and the values are the column values for this result row.
  */
 function db_fetch_array($result) {
   if ($result) {
@@ -193,15 +193,15 @@
 }
 
 /**
- * Return an individual result field from the previous query.
+ * Return an individual result column from the previous query.
  *
- * Only use this function if exactly one field is being selected; otherwise,
+ * Only use this function if exactly one column is being selected; otherwise,
  * use db_fetch_object() or db_fetch_array().
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
  * @return
- *   The resulting field or FALSE.
+ *   The resulting column or FALSE.
  */
 function db_result($result) {
   if ($result && pg_num_rows($result) > 0) {
@@ -224,11 +224,11 @@
  *
  * @param $table
  *   The name of the table you inserted into.
- * @param $field
- *   The name of the autoincrement field.
+ * @param $column
+ *   The name of the autoincrement column.
  */
-function db_last_insert_id($table, $field) {
-  return db_result(db_query("SELECT CURRVAL('{" . db_escape_table($table) . "}_" . db_escape_table($field) . "_seq')"));
+function db_last_insert_id($table, $column) {
+  return db_result(db_query("SELECT CURRVAL('{" . db_escape_table($table) . "}_" . db_escape_table($column) . "_seq')"));
 }
 
 /**
@@ -332,7 +332,7 @@
 
 /**
  * Returns a properly formatted Binary Large OBject value.
- * In case of PostgreSQL encodes data for insert into bytea field.
+ * In case of PostgreSQL encodes data for insert into bytea column.
  *
  * @param $data
  *   Data to encode.
@@ -345,7 +345,7 @@
 
 /**
  * Returns text from a Binary Large OBject value.
- * In case of PostgreSQL decodes data after select from bytea field.
+ * In case of PostgreSQL decodes data after select from bytea column.
  *
  * @param $data
  *   Data to decode.
@@ -407,21 +407,21 @@
 }
 
 /**
- * Wraps the given table.field entry with a DISTINCT(). The wrapper is added to
+ * Wraps the given table.column entry with a DISTINCT(). The wrapper is added to
  * the SELECT list entry of the given query and the resulting query is returned.
  * This function only applies the wrapper if a DISTINCT doesn't already exist in
  * the query.
  *
- * @param $table Table containing the field to set as DISTINCT
- * @param $field Field to set as DISTINCT
+ * @param $table Table containing the column to set as DISTINCT
+ * @param $column Column to set as DISTINCT
  * @param $query Query to apply the wrapper to
- * @return SQL query with the DISTINCT wrapper surrounding the given table.field.
+ * @return SQL query with the DISTINCT wrapper surrounding the given table.column.
  */
-function db_distinct_field($table, $field, $query) {
-  $field_to_select = 'DISTINCT ON (' . $table . '.' . $field . ") $table.$field";
+function db_distinct_column($table, $column, $query) {
+  $column_to_select = 'DISTINCT ON (' . $table . '.' . $column . ") $table.$column";
   // (?<!text) is a negative look-behind (no need to rewrite queries that already use DISTINCT).
-  $query = preg_replace('/(SELECT.*)(?:' . $table . '\.|\s)(?<!DISTINCT\()(?<!DISTINCT\(' . $table . '\.)' . $field . '(.*FROM )/AUsi', '\1 ' . $field_to_select . '\2', $query);
-  $query = preg_replace('/(ORDER BY )(?!' . $table . '\.' . $field . ')/', '\1' . "$table.$field, ", $query);
+  $query = preg_replace('/(SELECT.*)(?:' . $table . '\.|\s)(?<!DISTINCT\()(?<!DISTINCT\(' . $table . '\.)' . $column . '(.*FROM )/AUsi', '\1 ' . $column_to_select . '\2', $query);
+  $query = preg_replace('/(ORDER BY )(?!' . $table . '\.' . $column . ')/', '\1' . "$table.$column, ", $query);
   return $query;
 }
 
@@ -491,9 +491,9 @@
  *   An array of SQL statements to create the table.
  */
 function db_create_table_sql($name, $table) {
-  $sql_fields = array();
-  foreach ($table['fields'] as $field_name => $field) {
-    $sql_fields[] = _db_create_field_sql($field_name, _db_process_field($field));
+  $sql_columns = array();
+  foreach ($table['columns'] as $column_name => $column) {
+    $sql_columns[] = _db_create_column_sql($column_name, _db_process_column($column));
   }
 
   $sql_keys = array();
@@ -507,7 +507,7 @@
   }
 
   $sql = "CREATE TABLE {" . $name . "} (\n\t";
-  $sql .= implode(",\n\t", $sql_fields);
+  $sql .= implode(",\n\t", $sql_columns);
   if (count($sql_keys) > 0) {
     $sql .= ",\n\t";
   }
@@ -524,20 +524,20 @@
   return $statements;
 }
 
-function _db_create_index_sql($table, $name, $fields) {
+function _db_create_index_sql($table, $name, $columns) {
   $query = 'CREATE INDEX {' . $table . '}_' . $name . '_idx ON {' . $table . '} (';
-  $query .= _db_create_key_sql($fields) . ')';
+  $query .= _db_create_key_sql($columns) . ')';
   return $query;
 }
 
-function _db_create_key_sql($fields) {
+function _db_create_key_sql($columns) {
   $ret = array();
-  foreach ($fields as $field) {
-    if (is_array($field)) {
-      $ret[] = 'substr(' . $field[0] . ', 1, ' . $field[1] . ')';
+  foreach ($columns as $column) {
+    if (is_array($column)) {
+      $ret[] = 'substr(' . $column[0] . ', 1, ' . $column[1] . ')';
     }
     else {
-      $ret[] = $field;
+      $ret[] = $column;
     }
   }
   return implode(', ', $ret);
@@ -548,50 +548,50 @@
     db_add_primary_key($ret, $table, $new_keys['primary key']);
   }
   if (isset($new_keys['unique keys'])) {
-    foreach ($new_keys['unique keys'] as $name => $fields) {
-      db_add_unique_key($ret, $table, $name, $fields);
+    foreach ($new_keys['unique keys'] as $name => $columns) {
+      db_add_unique_key($ret, $table, $name, $columns);
     }
   }
   if (isset($new_keys['indexes'])) {
-    foreach ($new_keys['indexes'] as $name => $fields) {
-      db_add_index($ret, $table, $name, $fields);
+    foreach ($new_keys['indexes'] as $name => $columns) {
+      db_add_index($ret, $table, $name, $columns);
     }
   }
 }
 
 /**
- * Set database-engine specific properties for a field.
+ * Set database-engine specific properties for a column.
  *
- * @param $field
- *   A field description array, as specified in the schema documentation.
+ * @param $column
+ *   A column description array, as specified in the schema documentation.
  */
-function _db_process_field($field) {
-  if (!isset($field['size'])) {
-    $field['size'] = 'normal';
+function _db_process_column($column) {
+  if (!isset($column['size'])) {
+    $column['size'] = 'normal';
   }
   // Set the correct database-engine specific datatype.
-  if (!isset($field['pgsql_type'])) {
+  if (!isset($column['pgsql_type'])) {
     $map = db_type_map();
-    $field['pgsql_type'] = $map[$field['type'] . ':' . $field['size']];
+    $column['pgsql_type'] = $map[$column['type'] . ':' . $column['size']];
   }
-  if ($field['type'] == 'serial') {
-    unset($field['not null']);
+  if ($column['type'] == 'serial') {
+    unset($column['not null']);
   }
-  return $field;
+  return $column;
 }
 
 /**
- * Create an SQL string for a field to be used in table creation or alteration.
+ * Create an SQL string for a column to be used in table creation or alteration.
  *
- * Before passing a field out of a schema definition into this function it has
- * to be processed by _db_process_field().
+ * Before passing a column out of a schema definition into this function it has
+ * to be processed by _db_process_column().
  *
  * @param $name
- *    Name of the field.
+ *    Name of the column.
  * @param $spec
- *    The field specification, as per the schema data structure format.
+ *    The column specification, as per the schema data structure format.
  */
-function _db_create_field_sql($name, $spec) {
+function _db_create_column_sql($name, $spec) {
   $sql = $name . ' ' . $spec['pgsql_type'];
 
   if ($spec['type'] == 'serial') {
@@ -599,7 +599,7 @@
   }
 
   // pgsql does not have unsigned types but supports constraints to
-  // restricted a signed field to be non-negative (e.g. CHECK (VALUE
+  // restricted a signed column to be non-negative (e.g. CHECK (VALUE
   // >= 0)).  system.module defines {,small,big}int_unsigned as the
   // corresponding integer type with this constraint but does not do
   // so for serial or numeric types.  It probably would have been
@@ -674,45 +674,45 @@
 }
 
 /**
- * Add a new field to a table.
+ * Add a new column to a table.
  *
  * @param $ret
  *   Array to which query results will be added.
  * @param $table
  *   Name of the table to be altered.
- * @param $field
- *   Name of the field to be added.
+ * @param $column
+ *   Name of the column to be added.
  * @param $spec
- *   The field specification array, as taken from a schema definition.
+ *   The column specification array, as taken from a schema definition.
  *   The specification may also contain the key 'initial', the newly
- *   created field will be set to the value of the key in all rows.
+ *   created column will be set to the value of the key in all rows.
  *   This is most useful for creating NOT NULL columns with no default
  *   value in existing tables.
  * @param $keys_new
  *   Optional keys and indexes specification to be created on the
- *   table along with adding the field. The format is the same as a
- *   table specification but without the 'fields' element.  If you are
- *   adding a type 'serial' field, you MUST specify at least one key
- *   or index including it in this array. @see db_change_field for more
+ *   table along with adding the column. The format is the same as a
+ *   table specification but without the 'columns' element.  If you are
+ *   adding a type 'serial' column, you MUST specify at least one key
+ *   or index including it in this array. @see db_change_column for more
  *   explanation why.
  */
-function db_add_field(&$ret, $table, $field, $spec, $new_keys = array()) {
+function db_add_column(&$ret, $table, $column, $spec, $new_keys = array()) {
   $fixnull = FALSE;
   if (!empty($spec['not null']) && !isset($spec['default'])) {
     $fixnull = TRUE;
     $spec['not null'] = FALSE;
   }
   $query = 'ALTER TABLE {' . $table . '} ADD COLUMN ';
-  $query .= _db_create_field_sql($field, _db_process_field($spec));
+  $query .= _db_create_column_sql($column, _db_process_column($spec));
   $ret[] = update_sql($query);
   if (isset($spec['initial'])) {
     // All this because update_sql does not support %-placeholders.
-    $sql = 'UPDATE {' . $table . '} SET ' . $field . ' = ' . db_type_placeholder($spec['type']);
+    $sql = 'UPDATE {' . $table . '} SET ' . $column . ' = ' . db_type_placeholder($spec['type']);
     $result = db_query($sql, $spec['initial']);
     $ret[] = array('success' => $result !== FALSE, 'query' => check_plain($sql . ' (' . $spec['initial'] . ')'));
   }
   if ($fixnull) {
-    $ret[] = update_sql("ALTER TABLE {" . $table . "} ALTER $field SET NOT NULL");
+    $ret[] = update_sql("ALTER TABLE {" . $table . "} ALTER $column SET NOT NULL");
   }
   if (isset($new_keys)) {
     _db_create_keys($ret, $table, $new_keys);
@@ -720,32 +720,32 @@
 }
 
 /**
- * Drop a field.
+ * Drop a column.
  *
  * @param $ret
  *   Array to which query results will be added.
  * @param $table
  *   The table to be altered.
- * @param $field
- *   The field to be dropped.
+ * @param $column
+ *   The column to be dropped.
  */
-function db_drop_field(&$ret, $table, $field) {
-  $ret[] = update_sql('ALTER TABLE {' . $table . '} DROP COLUMN ' . $field);
+function db_drop_column(&$ret, $table, $column) {
+  $ret[] = update_sql('ALTER TABLE {' . $table . '} DROP COLUMN ' . $column);
 }
 
 /**
- * Set the default value for a field.
+ * Set the default value for a column.
  *
  * @param $ret
  *   Array to which query results will be added.
  * @param $table
  *   The table to be altered.
- * @param $field
- *   The field to be altered.
+ * @param $column
+ *   The column to be altered.
  * @param $default
  *   Default value to be set. NULL for 'default NULL'.
  */
-function db_field_set_default(&$ret, $table, $field, $default) {
+function db_column_set_default(&$ret, $table, $column, $default) {
   if ($default == NULL) {
     $default = 'NULL';
   }
@@ -753,21 +753,21 @@
     $default = is_string($default) ? "'$default'" : $default;
   }
 
-  $ret[] = update_sql('ALTER TABLE {' . $table . '} ALTER COLUMN ' . $field . ' SET DEFAULT ' . $default);
+  $ret[] = update_sql('ALTER TABLE {' . $table . '} ALTER COLUMN ' . $column . ' SET DEFAULT ' . $default);
 }
 
 /**
- * Set a field to have no default value.
+ * Set a column to have no default value.
  *
  * @param $ret
  *   Array to which query results will be added.
  * @param $table
  *   The table to be altered.
- * @param $field
- *   The field to be altered.
+ * @param $column
+ *   The column to be altered.
  */
-function db_field_set_no_default(&$ret, $table, $field) {
-  $ret[] = update_sql('ALTER TABLE {' . $table . '} ALTER COLUMN ' . $field . ' DROP DEFAULT');
+function db_column_set_no_default(&$ret, $table, $column) {
+  $ret[] = update_sql('ALTER TABLE {' . $table . '} ALTER COLUMN ' . $column . ' DROP DEFAULT');
 }
 
 /**
@@ -777,12 +777,12 @@
  *   Array to which query results will be added.
  * @param $table
  *   The table to be altered.
- * @param $fields
+ * @param $columns
  *   Fields for the primary key.
  */
-function db_add_primary_key(&$ret, $table, $fields) {
+function db_add_primary_key(&$ret, $table, $columns) {
   $ret[] = update_sql('ALTER TABLE {' . $table . '} ADD PRIMARY KEY (' .
-    implode(',', $fields) . ')');
+    implode(',', $columns) . ')');
 }
 
 /**
@@ -806,13 +806,13 @@
  *   The table to be altered.
  * @param $name
  *   The name of the key.
- * @param $fields
- *   An array of field names.
+ * @param $columns
+ *   An array of column names.
  */
-function db_add_unique_key(&$ret, $table, $name, $fields) {
+function db_add_unique_key(&$ret, $table, $name, $columns) {
   $name = '{' . $table . '}_' . $name . '_key';
   $ret[] = update_sql('ALTER TABLE {' . $table . '} ADD CONSTRAINT ' .
-    $name . ' UNIQUE (' . implode(',', $fields) . ')');
+    $name . ' UNIQUE (' . implode(',', $columns) . ')');
 }
 
 /**
@@ -839,11 +839,11 @@
  *   The table to be altered.
  * @param $name
  *   The name of the index.
- * @param $fields
- *   An array of field names.
+ * @param $columns
+ *   An array of column names.
  */
-function db_add_index(&$ret, $table, $name, $fields) {
-  $ret[] = update_sql(_db_create_index_sql($table, $name, $fields));
+function db_add_index(&$ret, $table, $name, $columns) {
+  $ret[] = update_sql(_db_create_index_sql($table, $name, $columns));
 }
 
 /**
@@ -862,20 +862,20 @@
 }
 
 /**
- * Change a field definition.
+ * Change a column definition.
  *
  * IMPORTANT NOTE: To maintain database portability, you have to explicitly
- * recreate all indices and primary keys that are using the changed field.
+ * recreate all indices and primary keys that are using the changed column.
  *
  * That means that you have to drop all affected keys and indexes with
- * db_drop_{primary_key,unique_key,index}() before calling db_change_field().
+ * db_drop_{primary_key,unique_key,index}() before calling db_change_column().
  * To recreate the keys and indices, pass the key definitions as the
- * optional $new_keys argument directly to db_change_field().
+ * optional $new_keys argument directly to db_change_column().
  *
  * For example, suppose you have:
  * @code
  * $schema['foo'] = array(
- *   'fields' => array(
+ *   'columns' => array(
  *     'bar' => array('type' => 'int', 'not null' => TRUE)
  *   ),
  *   'primary key' => array('bar')
@@ -885,58 +885,58 @@
  * primary key.  The correct sequence is:
  * @code
  * db_drop_primary_key($ret, 'foo');
- * db_change_field($ret, 'foo', 'bar', 'bar',
+ * db_change_column($ret, 'foo', 'bar', 'bar',
  *   array('type' => 'serial', 'not null' => TRUE),
  *   array('primary key' => array('bar')));
  * @endcode
  *
  * The reasons for this are due to the different database engines:
  *
- * On PostgreSQL, changing a field definition involves adding a new field
+ * On PostgreSQL, changing a column definition involves adding a new column
  * and dropping an old one which* causes any indices, primary keys and
- * sequences (from serial-type fields) that use the changed field to be dropped.
+ * sequences (from serial-type columns) that use the changed column to be dropped.
  *
- * On MySQL, all type 'serial' fields must be part of at least one key
+ * On MySQL, all type 'serial' columns must be part of at least one key
  * or index as soon as they are created.  You cannot use
  * db_add_{primary_key,unique_key,index}() for this purpose because
  * the ALTER TABLE command will fail to add the column without a key
  * or index specification.  The solution is to use the optional
  * $new_keys argument to create the key or index at the same time as
- * field.
+ * column.
  *
  * You could use db_add_{primary_key,unique_key,index}() in all cases
- * unless you are converting a field to be type serial. You can use
+ * unless you are converting a column to be type serial. You can use
  * the $new_keys argument in all cases.
  *
  * @param $ret
  *   Array to which query results will be added.
  * @param $table
  *   Name of the table.
- * @param $field
- *   Name of the field to change.
- * @param $field_new
- *   New name for the field (set to the same as $field if you don't want to change the name).
+ * @param $column
+ *   Name of the column to change.
+ * @param $column_new
+ *   New name for the column (set to the same as $column if you don't want to change the name).
  * @param $spec
- *   The field specification for the new field.
+ *   The column specification for the new column.
  * @param $new_keys
  *   Optional keys and indexes specification to be created on the
- *   table along with changing the field. The format is the same as a
- *   table specification but without the 'fields' element.
+ *   table along with changing the column. The format is the same as a
+ *   table specification but without the 'columns' element.
  */
-function db_change_field(&$ret, $table, $field, $field_new, $spec, $new_keys = array()) {
-  $ret[] = update_sql("ALTER TABLE {" . $table . "} RENAME $field TO " . $field . "_old");
+function db_change_column(&$ret, $table, $column, $column_new, $spec, $new_keys = array()) {
+  $ret[] = update_sql("ALTER TABLE {" . $table . "} RENAME $column TO " . $column . "_old");
   $not_null = isset($spec['not null']) ? $spec['not null'] : FALSE;
   unset($spec['not null']);
 
-  db_add_field($ret, $table, "$field_new", $spec);
+  db_add_column($ret, $table, "$column_new", $spec);
 
-  $ret[] = update_sql("UPDATE {" . $table . "} SET $field_new = " . $field . "_old");
+  $ret[] = update_sql("UPDATE {" . $table . "} SET $column_new = " . $column . "_old");
 
   if ($not_null) {
-    $ret[] = update_sql("ALTER TABLE {" . $table . "} ALTER $field_new SET NOT NULL");
+    $ret[] = update_sql("ALTER TABLE {" . $table . "} ALTER $column_new SET NOT NULL");
   }
 
-  db_drop_field($ret, $table, $field . '_old');
+  db_drop_column($ret, $table, $column . '_old');
 
   if (isset($new_keys)) {
     _db_create_keys($ret, $table, $new_keys);
Index: includes/database.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database.inc,v
retrieving revision 1.94
diff -u -r1.94 database.inc
--- includes/database.inc	20 Apr 2008 18:23:21 -0000	1.94
+++ includes/database.inc	1 Jul 2008 05:06:52 -0000
@@ -228,13 +228,13 @@
 /**
  * Generate placeholders for an array of query arguments of a single type.
  *
- * Given a Schema API field type, return correct %-placeholders to
+ * Given a Schema API column type, return correct %-placeholders to
  * embed in a query
  *
  * @param $arguments
  *  An array with at least one element.
  * @param $type
- *   The Schema API type of a field (e.g. 'int', 'text', or 'varchar').
+ *   The Schema API type of a column (e.g. 'int', 'text', or 'varchar').
  */
 function db_placeholders($arguments, $type = 'int') {
   $placeholder = db_type_placeholder($type);
@@ -255,23 +255,23 @@
  * @param $query
  *   Query to be rewritten.
  * @param $primary_table
- *   Name or alias of the table which has the primary key field for this query.
+ *   Name or alias of the table which has the primary key column for this query.
  *   Typical table names would be: {blocks}, {comments}, {forum}, {node},
  *   {menu}, {term_data} or {vocabulary}. However, in most cases the usual
  *   table alias (b, c, f, n, m, t or v) is used instead of the table name.
- * @param $primary_field
- *   Name of the primary field.
+ * @param $primary_column
+ *   Name of the primary column.
  * @param $args
  *   Array of additional arguments.
  * @return
- *   An array: join statements, where statements, field or DISTINCT(field).
+ *   An array: join statements, where statements, column or DISTINCT(column).
  */
-function _db_rewrite_sql($query = '', $primary_table = 'n', $primary_field = 'nid', $args = array()) {
+function _db_rewrite_sql($query = '', $primary_table = 'n', $primary_column = 'nid', $args = array()) {
   $where = array();
   $join = array();
   $distinct = FALSE;
   foreach (module_implements('db_rewrite_sql') as $module) {
-    $result = module_invoke($module, 'db_rewrite_sql', $query, $primary_table, $primary_field, $args);
+    $result = module_invoke($module, 'db_rewrite_sql', $query, $primary_table, $primary_column, $args);
     if (isset($result) && is_array($result)) {
       if (isset($result['where'])) {
         $where[] = $result['where'];
@@ -301,23 +301,23 @@
  * @param $query
  *   Query to be rewritten.
  * @param $primary_table
- *   Name or alias of the table which has the primary key field for this query.
+ *   Name or alias of the table which has the primary key column for this query.
  *   Typical table names would be: {blocks}, {comments}, {forum}, {node},
  *   {menu}, {term_data} or {vocabulary}. However, it is more common to use the
  *   the usual table aliases: b, c, f, n, m, t or v.
- * @param $primary_field
- *   Name of the primary field.
+ * @param $primary_column
+ *   Name of the primary column.
  * @param $args
  *   An array of arguments, passed to the implementations of hook_db_rewrite_sql.
  * @return
  *   The original query with JOIN and WHERE statements inserted from
  *   hook_db_rewrite_sql implementations. nid is rewritten if needed.
  */
-function db_rewrite_sql($query, $primary_table = 'n', $primary_field = 'nid',  $args = array()) {
-  list($join, $where, $distinct) = _db_rewrite_sql($query, $primary_table, $primary_field, $args);
+function db_rewrite_sql($query, $primary_table = 'n', $primary_column = 'nid',  $args = array()) {
+  list($join, $where, $distinct) = _db_rewrite_sql($query, $primary_table, $primary_column, $args);
 
   if ($distinct) {
-    $query = db_distinct_field($primary_table, $primary_field, $query);
+    $query = db_distinct_column($primary_table, $primary_column, $query);
   }
 
   if (!empty($where) || !empty($join)) {
@@ -400,24 +400,24 @@
  *   - 'description': A string describing this table and its purpose.
  *     References to other tables should be enclosed in
  *     curly-brackets.  For example, the node_revisions table
- *     description field might contain "Stores per-revision title and
+ *     description column might contain "Stores per-revision title and
  *     body data for each {node}."
- *   - 'fields': An associative array ('fieldname' => specification)
+ *   - 'columns': An associative array ('columnname' => specification)
  *     that describes the table's database columns.  The specification
  *     is also an array.  The following specification parameters are defined:
  *
- *     - 'description': A string describing this field and its purpose.
+ *     - 'description': A string describing this column and its purpose.
  *       References to other tables should be enclosed in
- *       curly-brackets.  For example, the node table vid field
+ *       curly-brackets.  For example, the node table vid column
  *       description might contain "Always holds the largest (most
  *       recent) {node_revisions}.vid value for this nid."
  *     - 'type': The generic datatype: 'varchar', 'int', 'serial'
  *       'float', 'numeric', 'text', 'blob' or 'datetime'.  Most types
  *       just map to the according database engine specific
- *       datatypes.  Use 'serial' for auto incrementing fields. This
+ *       datatypes.  Use 'serial' for auto incrementing columns. This
  *       will expand to 'int auto_increment' on mysql.
  *     - 'size': The data size: 'tiny', 'small', 'medium', 'normal',
- *       'big'.  This is a hint about the largest value the field will
+ *       'big'.  This is a hint about the largest value the column will
  *       store and determines which of the database engine specific
  *       datatypes will be used (e.g. on MySQL, TINYINT vs. INT vs. BIGINT).
  *       'normal', the default, selects the base type (e.g. on MySQL,
@@ -427,20 +427,20 @@
  *       db_type_map() for possible combinations.
  *     - 'not null': If true, no NULL values will be allowed in this
  *       database column.  Defaults to false.
- *     - 'default': The field's default value.  The PHP type of the
+ *     - 'default': The column's default value.  The PHP type of the
  *       value matters: '', '0', and 0 are all different.  If you
- *       specify '0' as the default value for a type 'int' field it
+ *       specify '0' as the default value for a type 'int' column it
  *       will not work because '0' is a string containing the
  *       character "zero", not an integer.
  *     - 'length': The maximal length of a type 'varchar' or 'text'
- *       field.  Ignored for other field types.
+ *       column.  Ignored for other column types.
  *     - 'unsigned': A boolean indicating whether a type 'int', 'float'
  *       and 'numeric' only is signed or unsigned.  Defaults to
- *       FALSE.  Ignored for other field types.
- *     - 'precision', 'scale': For type 'numeric' fields, indicates
+ *       FALSE.  Ignored for other column types.
+ *     - 'precision', 'scale': For type 'numeric' columns, indicates
  *       the precision (total number of significant digits) and scale
  *       (decimal digits right of the decimal point).  Both values are
- *       mandatory.  Ignored for other field types.
+ *       mandatory.  Ignored for other column types.
  *
  *     All parameters apart from 'type' are optional except that type
  *     'numeric' columns must specify 'precision' and 'scale'.
@@ -460,15 +460,15 @@
  * of the named column.
  *
  * As an example, here is a SUBSET of the schema definition for
- * Drupal's 'node' table.  It show four fields (nid, vid, type, and
- * title), the primary key on field 'nid', a unique key named 'vid' on
- * field 'vid', and two indexes, one named 'nid' on field 'nid' and
- * one named 'node_title_type' on the field 'title' and the first four
- * bytes of the field 'type':
+ * Drupal's 'node' table.  It show four column (nid, vid, type, and
+ * title), the primary key on column 'nid', a unique key named 'vid' on
+ * column 'vid', and two indexes, one named 'nid' on column 'nid' and
+ * one named 'node_title_type' on the column 'title' and the first four
+ * bytes of the column 'type':
  *
  * @code
  * $schema['node'] = array(
- *   'fields' => array(
+ *   'columns' => array(
  *     'nid'      => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
  *     'vid'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
  *     'type'     => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
@@ -506,37 +506,37 @@
 }
 
 /**
- * Return an array of field names from an array of key/index column specifiers.
+ * Return an array of column names from an array of key/index column specifiers.
  *
  * This is usually an identity function but if a key/index uses a column prefix
  * specification, this function extracts just the name.
  *
- * @param $fields
+ * @param $columns
  *   An array of key/index column specifiers.
  * @return
- *   An array of field names.
+ *   An array of column names.
  */
-function db_field_names($fields) {
+function db_column_names($columns) {
   $ret = array();
-  foreach ($fields as $field) {
-    if (is_array($field)) {
-      $ret[] = $field[0];
+  foreach ($columns as $column) {
+    if (is_array($column)) {
+      $ret[] = $column[0];
     }
     else {
-      $ret[] = $field;
+      $ret[] = $column;
     }
   }
   return $ret;
 }
 
 /**
- * Given a Schema API field type, return the correct %-placeholder.
+ * Given a Schema API column type, return the correct %-placeholder.
  *
  * Embed the placeholder in a query to be passed to db_query and and pass as an
  * argument to db_query a value of the specified type.
  *
  * @param $type
- *   The Schema API type of a field.
+ *   The Schema API type of a column.
  * @return
  *   The placeholder string to embed in a query for that type.
  */
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.773
diff -u -r1.773 common.inc
--- includes/common.inc	24 Jun 2008 22:09:52 -0000	1.773
+++ includes/common.inc	1 Jul 2008 05:06:50 -0000
@@ -3195,28 +3195,28 @@
 }
 
 /**
- * Retrieve a list of fields from a table schema. The list is suitable for use in a SQL query.
+ * Retrieve a list of columns from a table schema. The list is suitable for use in a SQL query.
  *
  * @param $table
- *   The name of the table from which to retrieve fields.
+ *   The name of the table from which to retrieve columns.
  * @param
- *   An optional prefix to to all fields.
+ *   An optional prefix to to all columns.
  *
- * @return An array of fields.
+ * @return An array of columns.
  **/
-function drupal_schema_fields_sql($table, $prefix = NULL) {
-  $schema = drupal_get_schema($table);
-  $fields = array_keys($schema['fields']);
+function drupal_schema_columns_sql($table, $prefix = NULL) {
   if ($prefix) {
     $columns = array();
-    foreach ($fields as $field) {
-      $columns[] = "$prefix.$field";
+    foreach ($columns as $column) {
+      $columns[] = "$prefix.$column";
     }
-    return $columns;
   }
   else {
-    return $fields;
+    $schema = drupal_get_schema($table);
+    $columns = array_keys($schema['columns']);
   }
+  
+  return $columns;
 }
 
 /**
@@ -3232,13 +3232,13 @@
  *   the schema may be filled in on the object, as well as ID on the serial
  *   type(s). Both array an object types may be passed.
  * @param $update
- *   If this is an update, specify the primary keys' field names. It is the
+ *   If this is an update, specify the primary keys' column names. It is the
  *   caller's responsibility to know if a record for this object already
  *   exists in the database. If there is only 1 key, you may pass a simple string.
  * @return
  *   Failure to write a record will return FALSE. Otherwise SAVED_NEW or
  *   SAVED_UPDATED is returned depending on the operation performed. The
- *   $object parameter contains values for any serial fields defined by
+ *   $object parameter contains values for any serial columns defined by
  *   the $table. For example, $object->nid will be populated after inserting
  *   a new node.
  */
@@ -3262,38 +3262,38 @@
     $array = FALSE;
   }
 
-  $fields = $defs = $values = $serials = $placeholders = array();
+  $columns = $defs = $values = $serials = $placeholders = array();
 
   // Go through our schema, build SQL, and when inserting, fill in defaults for
   // fields that are not set.
-  foreach ($schema['fields'] as $field => $info) {
+  foreach ($schema['columns'] as $column => $info) {
     // Special case -- skip serial types if we are updating.
     if ($info['type'] == 'serial' && count($update)) {
       continue;
     }
 
     // For inserts, populate defaults from Schema if not already provided
-    if (!isset($object->$field) && !count($update) && isset($info['default'])) {
-      $object->$field = $info['default'];
+    if (!isset($object->$column) && !count($update) && isset($info['default'])) {
+      $object->$column = $info['default'];
     }
 
-    // Track serial fields so we can helpfully populate them after the query.
+    // Track serial columns so we can helpfully populate them after the query.
     if ($info['type'] == 'serial') {
-      $serials[] = $field;
+      $serials[] = $column;
       // Ignore values for serials when inserting data. Unsupported.
-      unset($object->$field);
+      unset($object->$column);
     }
 
-    // Build arrays for the fields, placeholders, and values in our query.
-    if (isset($object->$field)) {
-      $fields[] = $field;
+    // Build arrays for the columns, placeholders, and values in our query.
+    if (isset($object->$column)) {
+      $columns[] = $column;
       $placeholders[] = db_type_placeholder($info['type']);
 
       if (empty($info['serialize'])) {
-        $values[] = $object->$field;
+        $values[] = $object->$column;
       }
-      elseif (!empty($object->$field)) {
-        $values[] = serialize($object->$field);
+      elseif (!empty($object->$column)) {
+        $values[] = serialize($object->$column);
       }
       else {
         $values[] = '';
@@ -3301,7 +3301,7 @@
     }
   }
 
-  if (empty($fields)) {
+  if (empty($columns)) {
     // No changes requested.
     // If we began with an array, convert back so we don't surprise the caller.
     if ($array) {
@@ -3313,20 +3313,20 @@
   // Build the SQL.
   $query = '';
   if (!count($update)) {
-    $query = "INSERT INTO {" . $table . "} (" . implode(', ', $fields) . ') VALUES (' . implode(', ', $placeholders) . ')';
+    $query = "INSERT INTO {" . $table . "} (" . implode(', ', $columns) . ') VALUES (' . implode(', ', $placeholders) . ')';
     $return = SAVED_NEW;
   }
   else {
     $query = '';
-    foreach ($fields as $id => $field) {
+    foreach ($columns as $id => $column) {
       if ($query) {
         $query .= ', ';
       }
-      $query .= $field . ' = ' . $placeholders[$id];
+      $query .= $column . ' = ' . $placeholders[$id];
     }
 
     foreach ($update as $key){
-      $conditions[] = "$key = " . db_type_placeholder($schema['fields'][$key]['type']);
+      $conditions[] = "$key = " . db_type_placeholder($schema['columns'][$key]['type']);
       $values[] = $object->$key;
     }
 
@@ -3338,8 +3338,8 @@
   if (db_query($query, $values)) {
     if ($serials) {
       // Get last insert ids and fill them in.
-      foreach ($serials as $field) {
-        $object->$field = db_last_insert_id($table, $field);
+      foreach ($serials as $column) {
+        $object->$column = db_last_insert_id($table, $column);
       }
     }
   }
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.428
diff -u -r1.428 theme.inc
--- includes/theme.inc	25 Jun 2008 09:12:24 -0000	1.428
+++ includes/theme.inc	1 Jul 2008 05:07:00 -0000
@@ -1214,7 +1214,7 @@
  *   An array containing the table headers. Each element of the array can be
  *   either a localized string or an associative array with the following keys:
  *   - "data": The localized title of the table column.
- *   - "field": The database field represented in the table column (required if
+ *   - "column": The database column represented in the table column (required if
  *     user is to be able to sort on this column).
  *   - "sort": A default sort order for this column ("asc" or "desc").
  *   - Any HTML attributes, such as "colspan", to apply to the column header cell.
Index: includes/tablesort.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/tablesort.inc,v
retrieving revision 1.48
diff -u -r1.48 tablesort.inc
--- includes/tablesort.inc	14 Apr 2008 17:48:33 -0000	1.48
+++ includes/tablesort.inc	1 Jul 2008 05:06:56 -0000
@@ -40,13 +40,13 @@
   $ts = tablesort_init($header);
   if ($ts['sql']) {
     // Based on code from db_escape_table(), but this can also contain a dot.
-    $field = preg_replace('/[^A-Za-z0-9_.]+/', '', $ts['sql']);
+    $column = preg_replace('/[^A-Za-z0-9_.]+/', '', $ts['sql']);
 
     // Sort order can only be ASC or DESC.
     $sort = drupal_strtoupper($ts['sort']);
     $sort = in_array($sort, array('ASC', 'DESC')) ? $sort : '';
 
-    return " ORDER BY $before $field $sort";
+    return " ORDER BY $before $column $sort";
   }
 }
 
@@ -67,7 +67,7 @@
  */
 function tablesort_header($cell, $header, $ts) {
   // Special formatting for the currently sorted column header.
-  if (is_array($cell) && isset($cell['field'])) {
+  if (is_array($cell) && isset($cell['column'])) {
     $title = t('sort by @s', array('@s' => $cell['data']));
     if ($cell['data'] == $ts['name']) {
       $ts['sort'] = (($ts['sort'] == 'asc') ? 'desc' : 'asc');
@@ -90,7 +90,7 @@
     }
     $cell['data'] = l($cell['data'] . $image, $_GET['q'], array('attributes' => array('title' => $title), 'query' => 'sort=' . $ts['sort'] . '&order=' . urlencode($cell['data']) . $ts['query_string'], 'html' => TRUE));
 
-    unset($cell['field'], $cell['sort']);
+    unset($cell['column'], $cell['sort']);
   }
   return $cell;
 }
@@ -112,7 +112,7 @@
  *   A properly formatted cell, ready for _theme_table_cell().
  */
 function tablesort_cell($cell, $header, $ts, $i) {
-  if (isset($header[$i]['data']) && $header[$i]['data'] == $ts['name'] && !empty($header[$i]['field'])) {
+  if (isset($header[$i]['data']) && $header[$i]['data'] == $ts['name'] && !empty($header[$i]['column'])) {
     if (is_array($cell)) {
       if (isset($cell['class'])) {
         $cell['class'] .= ' active';
@@ -147,17 +147,17 @@
  * @return
  *   An associative array describing the criterion, containing the keys:
  *   - "name": The localized title of the table column.
- *   - "sql": The name of the database field to sort on.
+ *   - "sql": The name of the database column to sort on.
  */
 function tablesort_get_order($headers) {
   $order = isset($_GET['order']) ? $_GET['order'] : '';
   foreach ($headers as $header) {
     if (isset($header['data']) && $order == $header['data']) {
-      return array('name' => $header['data'], 'sql' => isset($header['field']) ? $header['field'] : '');
+      return array('name' => $header['data'], 'sql' => isset($header['column']) ? $header['column'] : '');
     }
 
     if (isset($header['sort']) && ($header['sort'] == 'asc' || $header['sort'] == 'desc')) {
-      $default = array('name' => $header['data'], 'sql' => isset($header['field']) ? $header['field'] : '');
+      $default = array('name' => $header['data'], 'sql' => isset($header['column']) ? $header['column'] : '');
     }
   }
 
@@ -165,10 +165,10 @@
     return $default;
   }
   else {
-    // The first column specified is initial 'order by' field unless otherwise specified
+    // The first column specified is initial 'order by' column unless otherwise specified
     if (is_array($headers[0])) {
-      $headers[0] += array('data' => NULL, 'field' => NULL);
-      return array('name' => $headers[0]['data'], 'sql' => $headers[0]['field']);
+      $headers[0] += array('data' => NULL, 'column' => NULL);
+      return array('name' => $headers[0]['data'], 'sql' => $headers[0]['column']);
     }
     else {
       return array('name' => $headers[0]);
Index: includes/database.mysql.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database.mysql.inc,v
retrieving revision 1.91
diff -u -r1.91 database.mysql.inc
--- includes/database.mysql.inc	14 Apr 2008 17:48:33 -0000	1.91
+++ includes/database.mysql.inc	1 Jul 2008 05:06:53 -0000
@@ -138,7 +138,7 @@
  *   A database query result resource, as returned from db_query().
  * @return
  *   An object representing the next row of the result, or FALSE. The attributes
- *   of this object are the table fields selected by the query.
+ *   of this object are the table columns selected by the query.
  */
 function db_fetch_object($result) {
   if ($result) {
@@ -153,8 +153,8 @@
  *   A database query result resource, as returned from db_query().
  * @return
  *   An associative array representing the next row of the result, or FALSE.
- *   The keys of this object are the names of the table fields selected by the
- *   query, and the values are the field values for this result row.
+ *   The keys of this object are the names of the table columns selected by the
+ *   query, and the values are the column values for this result row.
  */
 function db_fetch_array($result) {
   if ($result) {
@@ -163,15 +163,15 @@
 }
 
 /**
- * Return an individual result field from the previous query.
+ * Return an individual result column from the previous query.
  *
- * Only use this function if exactly one field is being selected; otherwise,
+ * Only use this function if exactly one column is being selected; otherwise,
  * use db_fetch_object() or db_fetch_array().
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
  * @return
- *   The resulting field or FALSE.
+ *   The resulting column or FALSE.
  */
 function db_result($result) {
   if ($result && mysql_num_rows($result) > 0) {
@@ -351,20 +351,20 @@
 }
 
 /**
- * Wraps the given table.field entry with a DISTINCT(). The wrapper is added to
+ * Wraps the given table.column entry with a DISTINCT(). The wrapper is added to
  * the SELECT list entry of the given query and the resulting query is returned.
  * This function only applies the wrapper if a DISTINCT doesn't already exist in
  * the query.
  *
- * @param $table Table containing the field to set as DISTINCT
- * @param $field Field to set as DISTINCT
+ * @param $table Table containing the column to set as DISTINCT
+ * @param $column Field to set as DISTINCT
  * @param $query Query to apply the wrapper to
- * @return SQL query with the DISTINCT wrapper surrounding the given table.field.
+ * @return SQL query with the DISTINCT wrapper surrounding the given table.column.
  */
-function db_distinct_field($table, $field, $query) {
-  $field_to_select = 'DISTINCT(' . $table . '.' . $field . ')';
+function db_distinct_column($table, $column, $query) {
+  $column_to_select = 'DISTINCT(' . $table . '.' . $column . ')';
   // (?<!text) is a negative look-behind (no need to rewrite queries that already use DISTINCT).
-  return preg_replace('/(SELECT.*)(?:' . $table . '\.|\s)(?<!DISTINCT\()(?<!DISTINCT\(' . $table . '\.)' . $field . '(.*FROM )/AUsi', '\1 ' . $field_to_select . '\2', $query);
+  return preg_replace('/(SELECT.*)(?:' . $table . '\.|\s)(?<!DISTINCT\()(?<!DISTINCT\(' . $table . '\.)' . $column . '(.*FROM )/AUsi', '\1 ' . $column_to_select . '\2', $query);
 }
 
 /**
Index: modules/upload/upload.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.install,v
retrieving revision 1.7
diff -u -r1.7 upload.install
--- modules/upload/upload.install	10 Feb 2008 19:09:58 -0000	1.7
+++ modules/upload/upload.install	1 Jul 2008 05:07:35 -0000
@@ -27,7 +27,7 @@
 function upload_schema() {
   $schema['upload'] = array(
     'description' => t('Stores uploaded file information and table associations.'),
-    'fields' => array(
+    'columns' => array(
       'fid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
Index: modules/path/path.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.admin.inc,v
retrieving revision 1.8
diff -u -r1.8 path.admin.inc
--- modules/path/path.admin.inc	14 Apr 2008 17:48:38 -0000	1.8
+++ modules/path/path.admin.inc	1 Jul 2008 05:07:19 -0000
@@ -27,13 +27,13 @@
     $sql = 'SELECT * FROM {url_alias}';
   }
   $header = array(
-    array('data' => t('Alias'), 'field' => 'dst', 'sort' => 'asc'),
-    array('data' => t('System'), 'field' => 'src'),
+    array('data' => t('Alias'), 'column' => 'dst', 'sort' => 'asc'),
+    array('data' => t('System'), 'column' => 'src'),
     array('data' => t('Operations'), 'colspan' => '2')
   );
   if ($multilanguage) {
     $header[3] = $header[2];
-    $header[2] = array('data' => t('Language'), 'field' => 'language');
+    $header[2] = array('data' => t('Language'), 'column' => 'language');
   }
   $sql .= tablesort_sql($header);
   $result = pager_query($sql, 50, 0 , NULL, $keys);
Index: modules/taxonomy/taxonomy.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.install,v
retrieving revision 1.7
diff -u -r1.7 taxonomy.install
--- modules/taxonomy/taxonomy.install	8 Jan 2008 07:46:41 -0000	1.7
+++ modules/taxonomy/taxonomy.install	1 Jul 2008 05:07:35 -0000
@@ -7,7 +7,7 @@
 function taxonomy_schema() {
   $schema['term_data'] = array(
     'description' => t('Stores term information.'),
-    'fields' => array(
+    'columns' => array(
       'tid' => array(
         'type' => 'serial',
         'unsigned' => TRUE,
@@ -51,7 +51,7 @@
 
   $schema['term_hierarchy'] = array(
     'description' => t('Stores the hierarchical relationship between terms.'),
-    'fields' => array(
+    'columns' => array(
       'tid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
@@ -75,7 +75,7 @@
 
   $schema['term_node'] = array(
     'description' => t('Stores the relationship of terms to nodes.'),
-    'fields' => array(
+    'columns' => array(
       'nid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
@@ -107,7 +107,7 @@
 
   $schema['term_relation'] = array(
     'description' => t('Stores non-hierarchical relationships between terms.'),
-    'fields' => array(
+    'columns' => array(
       'trid' => array(
         'type' => 'serial',
         'not null' => TRUE,
@@ -139,7 +139,7 @@
 
   $schema['term_synonym'] = array(
     'description' => t('Stores term synonyms.'),
-    'fields' => array(
+    'columns' => array(
       'tsid' => array(
         'type' => 'serial',
         'not null' => TRUE,
@@ -169,7 +169,7 @@
 
   $schema['vocabulary'] = array(
     'description' => t('Stores vocabulary information.'),
-    'fields' => array(
+    'columns' => array(
       'vid' => array(
         'type' => 'serial',
         'unsigned' => TRUE,
@@ -259,7 +259,7 @@
 
   $schema['vocabulary_node_types'] = array(
     'description' => t('Stores which node types vocabularies may be used with.'),
-    'fields' => array(
+    'columns' => array(
       'vid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
Index: modules/comment/comment.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.install,v
retrieving revision 1.22
diff -u -r1.22 comment.install
--- modules/comment/comment.install	14 May 2008 13:12:40 -0000	1.22
+++ modules/comment/comment.install	1 Jul 2008 05:07:03 -0000
@@ -61,7 +61,7 @@
 }
 
 /**
- * Add index to parent ID field.
+ * Add index to parent ID column.
  */
 function comment_update_6003() {
   $ret = array();
@@ -77,7 +77,7 @@
 function comment_schema() {
   $schema['comments'] = array(
     'description' => t('Stores comments and associated data.'),
-    'fields' => array(
+    'columns' => array(
       'cid' => array(
         'type' => 'serial',
         'not null' => TRUE,
@@ -178,7 +178,7 @@
 
   $schema['node_comment_statistics'] = array(
     'description' => t('Maintains statistics of node and comments posts to show "new" and "updated" flags.'),
-    'fields' => array(
+    'columns' => array(
       'nid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
Index: modules/comment/comment.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.admin.inc,v
retrieving revision 1.9
diff -u -r1.9 comment.admin.inc
--- modules/comment/comment.admin.inc	14 May 2008 13:12:40 -0000	1.9
+++ modules/comment/comment.admin.inc	1 Jul 2008 05:07:02 -0000
@@ -62,10 +62,10 @@
     '#type' => 'value',
     '#value' => array(
       theme('table_select_header_cell'),
-      array('data' => t('Subject'), 'field' => 'subject'),
-      array('data' => t('Author'), 'field' => 'name'),
-      array('data' => t('Posted in'), 'field' => 'node_title'),
-      array('data' => t('Time'), 'field' => 'timestamp', 'sort' => 'desc'),
+      array('data' => t('Subject'), 'column' => 'subject'),
+      array('data' => t('Author'), 'column' => 'name'),
+      array('data' => t('Posted in'), 'column' => 'node_title'),
+      array('data' => t('Time'), 'column' => 'timestamp', 'sort' => 'desc'),
       array('data' => t('Operations')),
   ));
   $result = pager_query('SELECT c.subject, c.nid, c.cid, c.comment, c.timestamp, c.status, c.name, c.homepage, u.name AS registered_name, u.uid, n.title as node_title FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid INNER JOIN {node} n ON n.nid = c.nid WHERE c.status = %d' . tablesort_sql($form['header']['#value']), 50, 0, NULL, $status);
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.641
diff -u -r1.641 comment.module
--- modules/comment/comment.module	20 Jun 2008 16:52:55 -0000	1.641
+++ modules/comment/comment.module	1 Jul 2008 05:07:07 -0000
@@ -855,8 +855,8 @@
  * @param $cid
  *   Optional, if given, only one comment is rendered.
  *
- * To display threaded comments in the correct order we keep a 'thread' field
- * and order by that value. This field keeps this data in
+ * To display threaded comments in the correct order we keep a 'thread' column
+ * and order by that value. This column keeps this data in
  * a way which is easy to update and convenient to use.
  *
  * A "thread" value starts at "1". If we add a child (A) to this comment,
@@ -864,7 +864,7 @@
  * brother of (A) will get "1.2". Next brother of the parent of (A) will get
  * "2" and so on.
  *
- * First of all note that the thread field stores the depth of the comment:
+ * First of all note that the thread column stores the depth of the comment:
  * depth 0 will be "X", depth 1 "X.X", depth 2 "X.X.X", etc.
  *
  * Now to get the ordering right, consider this example:
@@ -896,7 +896,7 @@
  *
  * which is what we already did before the standard pager patch. To achieve
  * this we simply add a "/" at the end of each "thread" value. This way, the
- * thread fields will look like this:
+ * thread columns will look like this:
  *
  * 1/
  * 1.1/
@@ -1854,7 +1854,7 @@
  * Updates the comment statistics for a given node. This should be called any
  * time a comment is added, deleted, or updated.
  *
- * The following fields are contained in the node_comment_statistics table.
+ * The following columns are contained in the node_comment_statistics table.
  * - last_comment_timestamp: the timestamp of the last comment for this node or the node create stamp if no comments exist for the node.
  * - last_comment_name: the name of the anonymous poster for the last comment
  * - last_comment_uid: the uid of the poster for the last comment for this node or the node authors uid if no comments exists for the node.
Index: modules/forum/forum.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.install,v
retrieving revision 1.19
diff -u -r1.19 forum.install
--- modules/forum/forum.install	25 Jun 2008 07:47:20 -0000	1.19
+++ modules/forum/forum.install	1 Jul 2008 05:07:08 -0000
@@ -66,7 +66,7 @@
 function forum_schema() {
   $schema['forum'] = array(
     'description' => t('Stores the relationship of nodes to forum terms.'),
-    'fields' => array(
+    'columns' => array(
       'nid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.457
diff -u -r1.457 forum.module
--- modules/forum/forum.module	30 May 2008 18:17:35 -0000	1.457
+++ modules/forum/forum.module	1 Jul 2008 05:07:11 -0000
@@ -559,16 +559,16 @@
   global $user, $forum_topic_list_header;
 
   $forum_topic_list_header = array(
-    array('data' => '&nbsp;', 'field' => NULL),
-    array('data' => t('Topic'), 'field' => 'n.title'),
-    array('data' => t('Replies'), 'field' => 'l.comment_count'),
-    array('data' => t('Created'), 'field' => 'n.created'),
-    array('data' => t('Last reply'), 'field' => 'l.last_comment_timestamp'),
+    array('data' => '&nbsp;', 'column' => NULL),
+    array('data' => t('Topic'), 'column' => 'n.title'),
+    array('data' => t('Replies'), 'column' => 'l.comment_count'),
+    array('data' => t('Created'), 'column' => 'n.created'),
+    array('data' => t('Last reply'), 'column' => 'l.last_comment_timestamp'),
   );
 
   $order = _forum_get_topic_order($sortby);
   for ($i = 0; $i < count($forum_topic_list_header); $i++) {
-    if ($forum_topic_list_header[$i]['field'] == $order['field']) {
+    if ($forum_topic_list_header[$i]['column'] == $order['column']) {
       $forum_topic_list_header[$i]['sort'] = $order['sort'];
     }
   }
@@ -935,21 +935,21 @@
 function _forum_get_topic_order($sortby) {
   switch ($sortby) {
     case 1:
-      return array('field' => 'l.last_comment_timestamp', 'sort' => 'desc');
+      return array('column' => 'l.last_comment_timestamp', 'sort' => 'desc');
       break;
     case 2:
-      return array('field' => 'l.last_comment_timestamp', 'sort' => 'asc');
+      return array('column' => 'l.last_comment_timestamp', 'sort' => 'asc');
       break;
     case 3:
-      return array('field' => 'l.comment_count', 'sort' => 'desc');
+      return array('column' => 'l.comment_count', 'sort' => 'desc');
       break;
     case 4:
-      return array('field' => 'l.comment_count', 'sort' => 'asc');
+      return array('column' => 'l.comment_count', 'sort' => 'asc');
       break;
   }
 }
 
 function _forum_get_topic_order_sql($sortby) {
   $order = _forum_get_topic_order($sortby);
-  return $order['field'] . ' ' . strtoupper($order['sort']);
+  return $order['column'] . ' ' . strtoupper($order['sort']);
 }
Index: modules/profile/profile.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v
retrieving revision 1.241
diff -u -r1.241 profile.module
--- modules/profile/profile.module	6 May 2008 12:18:49 -0000	1.241
+++ modules/profile/profile.module	1 Jul 2008 05:07:21 -0000
@@ -54,11 +54,11 @@
 function profile_theme() {
   return array(
     'profile_block' => array(
-      'arguments' => array('account' => NULL, 'fields' => array()),
+      'arguments' => array('account' => NULL, 'columns' => array()),
       'template' => 'profile-block',
     ),
     'profile_listing' => array(
-      'arguments' => array('account' => NULL, 'fields' => array()),
+      'arguments' => array('account' => NULL, 'columns' => array()),
       'template' => 'profile-listing',
     ),
     'profile_wrapper' => array(
Index: modules/profile/profile.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.install,v
retrieving revision 1.13
diff -u -r1.13 profile.install
--- modules/profile/profile.install	15 Mar 2008 12:31:29 -0000	1.13
+++ modules/profile/profile.install	1 Jul 2008 05:07:19 -0000
@@ -25,7 +25,7 @@
 function profile_schema() {
   $schema['profile_fields'] = array(
     'description' => t('Stores profile field information.'),
-    'fields' => array(
+    'columns' => array(
       'fid' => array(
         'type' => 'serial',
         'not null' => TRUE,
@@ -119,7 +119,7 @@
 
   $schema['profile_values'] = array(
     'description' => t('Stores values for profile fields.'),
-    'fields' => array(
+    'columns' => array(
       'fid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
Index: modules/user/user.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.install,v
retrieving revision 1.12
diff -u -r1.12 user.install
--- modules/user/user.install	7 May 2008 19:34:24 -0000	1.12
+++ modules/user/user.install	1 Jul 2008 05:07:37 -0000
@@ -7,7 +7,7 @@
 function user_schema() {
   $schema['authmap'] = array(
     'description' => t('Stores distributed authentication mapping.'),
-    'fields' => array(
+    'columns' => array(
       'aid' => array(
         'description' => t('Primary Key: Unique authmap ID.'),
         'type' => 'serial',
@@ -43,7 +43,7 @@
 
   $schema['role_permission'] = array(
     'description' => t('Stores the permissions assigned to user roles.'),
-    'fields' => array(
+    'columns' => array(
       'rid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
@@ -66,7 +66,7 @@
 
   $schema['role'] = array(
     'description' => t('Stores user roles.'),
-    'fields' => array(
+    'columns' => array(
       'rid' => array(
         'type' => 'serial',
         'unsigned' => TRUE,
@@ -89,7 +89,7 @@
 
   $schema['users'] = array(
     'description' => t('Stores user data.'),
-    'fields' => array(
+    'columns' => array(
       'uid' => array(
         'type' => 'serial',
         'unsigned' => TRUE,
@@ -204,7 +204,7 @@
 
   $schema['users_roles'] = array(
     'description' => t('Maps users to roles.'),
-    'fields' => array(
+    'columns' => array(
       'uid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
@@ -246,7 +246,7 @@
   $hash_count_log2 = 11;
   // Multi-part update.
   if (!isset($sandbox['user_from'])) {
-    db_change_field($ret, 'users', 'pass', 'pass', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''));
+    db_change_column($ret, 'users', 'pass', 'pass', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''));
     $sandbox['user_from'] = 0;
     $sandbox['user_count'] = db_result(db_query("SELECT COUNT(uid) FROM {users}"));
   }
@@ -284,9 +284,9 @@
 
 function user_update_7001() {
   $ret = array();
-  db_drop_field($ret, 'users', 'threshold');
-  db_drop_field($ret, 'users', 'mode');
-  db_drop_field($ret, 'users', 'sort');
+  db_drop_column($ret, 'users', 'threshold');
+  db_drop_column($ret, 'users', 'mode');
+  db_drop_column($ret, 'users', 'sort');
 
   return $ret;
 }
Index: modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.22
diff -u -r1.22 user.admin.inc
--- modules/user/user.admin.inc	7 May 2008 19:34:24 -0000	1.22
+++ modules/user/user.admin.inc	1 Jul 2008 05:07:37 -0000
@@ -131,11 +131,11 @@
 
   $header = array(
     array(),
-    array('data' => t('Username'), 'field' => 'u.name'),
-    array('data' => t('Status'), 'field' => 'u.status'),
+    array('data' => t('Username'), 'column' => 'u.name'),
+    array('data' => t('Status'), 'column' => 'u.status'),
     t('Roles'),
-    array('data' => t('Member for'), 'field' => 'u.created', 'sort' => 'desc'),
-    array('data' => t('Last access'), 'field' => 'u.access'),
+    array('data' => t('Member for'), 'column' => 'u.created', 'sort' => 'desc'),
+    array('data' => t('Last access'), 'column' => 'u.access'),
     t('Operations')
   );
 
@@ -713,11 +713,11 @@
   // Overview table:
   $header = array(
     theme('table_select_header_cell'),
-    array('data' => t('Username'), 'field' => 'u.name'),
-    array('data' => t('Status'), 'field' => 'u.status'),
+    array('data' => t('Username'), 'column' => 'u.name'),
+    array('data' => t('Status'), 'column' => 'u.status'),
     t('Roles'),
-    array('data' => t('Member for'), 'field' => 'u.created', 'sort' => 'desc'),
-    array('data' => t('Last access'), 'field' => 'u.access'),
+    array('data' => t('Member for'), 'column' => 'u.created', 'sort' => 'desc'),
+    array('data' => t('Last access'), 'column' => 'u.access'),
     t('Operations')
   );
 
Index: modules/openid/openid.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.install,v
retrieving revision 1.3
diff -u -r1.3 openid.install
--- modules/openid/openid.install	10 Oct 2007 11:39:33 -0000	1.3
+++ modules/openid/openid.install	1 Jul 2008 05:07:18 -0000
@@ -23,7 +23,7 @@
 function openid_schema() {
   $schema['openid_association'] = array(
     'description' => t('Stores temporary shared key association information for OpenID authentication.'),
-    'fields' => array(
+    'columns' => array(
       'idp_endpoint_uri' => array(
         'type' => 'varchar',
         'length' => 255,
Index: modules/menu/menu.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.install,v
retrieving revision 1.12
diff -u -r1.12 menu.install
--- modules/menu/menu.install	25 Jun 2008 09:12:25 -0000	1.12
+++ modules/menu/menu.install	1 Jul 2008 05:07:12 -0000
@@ -29,7 +29,7 @@
 function menu_schema() {
   $schema['menu_custom'] = array(
     'description' => t('Holds definitions for top-level custom menus (for example, Main menu).'),
-    'fields' => array(
+    'columns' => array(
       'menu_name' => array(
         'type' => 'varchar',
         'length' => 32,
Index: modules/dblog/dblog.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.install,v
retrieving revision 1.7
diff -u -r1.7 dblog.install
--- modules/dblog/dblog.install	15 Mar 2008 12:31:28 -0000	1.7
+++ modules/dblog/dblog.install	1 Jul 2008 05:07:08 -0000
@@ -23,7 +23,7 @@
 function dblog_schema() {
   $schema['watchdog'] = array(
     'description' => t('Table that contains logs of all system events.'),
-    'fields' => array(
+    'columns' => array(
       'wid' => array(
         'type' => 'serial',
         'not null' => TRUE,
Index: modules/dblog/dblog.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.admin.inc,v
retrieving revision 1.7
diff -u -r1.7 dblog.admin.inc
--- modules/dblog/dblog.admin.inc	14 Apr 2008 17:48:36 -0000	1.7
+++ modules/dblog/dblog.admin.inc	1 Jul 2008 05:07:08 -0000
@@ -45,10 +45,10 @@
 
   $header = array(
     ' ',
-    array('data' => t('Type'), 'field' => 'w.type'),
-    array('data' => t('Date'), 'field' => 'w.wid', 'sort' => 'desc'),
+    array('data' => t('Type'), 'column' => 'w.type'),
+    array('data' => t('Date'), 'column' => 'w.wid', 'sort' => 'desc'),
     t('Message'),
-    array('data' => t('User'), 'field' => 'u.name'),
+    array('data' => t('User'), 'column' => 'u.name'),
     array('data' => t('Operations')),
   );
 
@@ -94,8 +94,8 @@
 function dblog_top($type) {
 
   $header = array(
-    array('data' => t('Count'), 'field' => 'count', 'sort' => 'desc'),
-    array('data' => t('Message'), 'field' => 'message')
+    array('data' => t('Count'), 'column' => 'count', 'sort' => 'desc'),
+    array('data' => t('Message'), 'column' => 'message')
   );
 
   $result = pager_query("SELECT COUNT(wid) AS count, message, variables FROM {watchdog} WHERE type = '%s' GROUP BY message, variables " . tablesort_sql($header), 30, 0, "SELECT COUNT(DISTINCT(message)) FROM {watchdog} WHERE type = '%s'", $type);
Index: modules/statistics/statistics.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.admin.inc,v
retrieving revision 1.8
diff -u -r1.8 statistics.admin.inc
--- modules/statistics/statistics.admin.inc	7 May 2008 19:17:50 -0000	1.8
+++ modules/statistics/statistics.admin.inc	1 Jul 2008 05:07:22 -0000
@@ -11,9 +11,9 @@
  */
 function statistics_recent_hits() {
   $header = array(
-    array('data' => t('Timestamp'), 'field' => 'a.timestamp', 'sort' => 'desc'),
-    array('data' => t('Page'), 'field' => 'a.path'),
-    array('data' => t('User'), 'field' => 'u.name'),
+    array('data' => t('Timestamp'), 'column' => 'a.timestamp', 'sort' => 'desc'),
+    array('data' => t('Page'), 'column' => 'a.path'),
+    array('data' => t('User'), 'column' => 'u.name'),
     array('data' => t('Operations'))
   );
 
@@ -47,10 +47,10 @@
   $sql_cnt = "SELECT COUNT(DISTINCT(path)) FROM {accesslog}";
 
   $header = array(
-    array('data' => t('Hits'), 'field' => 'hits', 'sort' => 'desc'),
-    array('data' => t('Page'), 'field' => 'path'),
-    array('data' => t('Average page generation time'), 'field' => 'average_time'),
-    array('data' => t('Total page generation time'), 'field' => 'total_time')
+    array('data' => t('Hits'), 'column' => 'hits', 'sort' => 'desc'),
+    array('data' => t('Page'), 'column' => 'path'),
+    array('data' => t('Average page generation time'), 'column' => 'average_time'),
+    array('data' => t('Total page generation time'), 'column' => 'total_time')
   );
   $sql .= tablesort_sql($header);
   $result = pager_query($sql, 30, 0, $sql_cnt);
@@ -76,9 +76,9 @@
 function statistics_top_visitors() {
 
   $header = array(
-    array('data' => t('Hits'), 'field' => 'hits', 'sort' => 'desc'),
-    array('data' => t('Visitor'), 'field' => 'u.name'),
-    array('data' => t('Total page generation time'), 'field' => 'total'),
+    array('data' => t('Hits'), 'column' => 'hits', 'sort' => 'desc'),
+    array('data' => t('Visitor'), 'column' => 'u.name'),
+    array('data' => t('Total page generation time'), 'column' => 'total'),
     array('data' => user_access('block IP addresses') ? t('Operations') : '', 'colspan' => 2),
   );
 
@@ -112,9 +112,9 @@
   drupal_set_title(t('Top referrers in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200)))));
 
   $header = array(
-    array('data' => t('Hits'), 'field' => 'hits', 'sort' => 'desc'),
-    array('data' => t('Url'), 'field' => 'url'),
-    array('data' => t('Last visit'), 'field' => 'last'),
+    array('data' => t('Hits'), 'column' => 'hits', 'sort' => 'desc'),
+    array('data' => t('Url'), 'column' => 'url'),
+    array('data' => t('Last visit'), 'column' => 'last'),
   );
 
   $query .= tablesort_sql($header);
Index: modules/statistics/statistics.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.pages.inc,v
retrieving revision 1.3
diff -u -r1.3 statistics.pages.inc
--- modules/statistics/statistics.pages.inc	14 Apr 2008 17:48:41 -0000	1.3
+++ modules/statistics/statistics.pages.inc	1 Jul 2008 05:07:22 -0000
@@ -10,9 +10,9 @@
   if ($node = node_load(arg(1))) {
 
     $header = array(
-        array('data' => t('Time'), 'field' => 'a.timestamp', 'sort' => 'desc'),
-        array('data' => t('Referrer'), 'field' => 'a.url'),
-        array('data' => t('User'), 'field' => 'u.name'),
+        array('data' => t('Time'), 'column' => 'a.timestamp', 'sort' => 'desc'),
+        array('data' => t('Referrer'), 'column' => 'a.url'),
+        array('data' => t('User'), 'column' => 'u.name'),
         array('data' => t('Operations')));
 
     $result = pager_query('SELECT a.aid, a.timestamp, a.url, a.uid, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE a.path LIKE \'node/%d%%\'' . tablesort_sql($header), 30, 0, NULL, $node->nid);
@@ -43,8 +43,8 @@
   if ($account = user_load(array('uid' => arg(1)))) {
 
     $header = array(
-        array('data' => t('Timestamp'), 'field' => 'timestamp', 'sort' => 'desc'),
-        array('data' => t('Page'), 'field' => 'path'),
+        array('data' => t('Timestamp'), 'column' => 'timestamp', 'sort' => 'desc'),
+        array('data' => t('Page'), 'column' => 'path'),
         array('data' => t('Operations')));
 
     $result = pager_query('SELECT aid, timestamp, path, title FROM {accesslog} WHERE uid = %d' . tablesort_sql($header), 30, 0, NULL, $account->uid);
Index: modules/statistics/statistics.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.install,v
retrieving revision 1.13
diff -u -r1.13 statistics.install
--- modules/statistics/statistics.install	18 Dec 2007 12:59:22 -0000	1.13
+++ modules/statistics/statistics.install	1 Jul 2008 05:07:22 -0000
@@ -10,7 +10,7 @@
 }
 
 /**
- * Changes session ID  field to VARCHAR(64) to add support for SHA-1 hashes.
+ * Changes session ID column to VARCHAR(64) to add support for SHA-1 hashes.
  */
 function statistics_update_1000() {
   $ret = array();
@@ -50,7 +50,7 @@
 function statistics_schema() {
   $schema['accesslog'] = array(
     'description' => t('Stores site access information for statistics.'),
-    'fields' => array(
+    'columns' => array(
       'aid' => array(
         'type' => 'serial',
         'not null' => TRUE,
Index: modules/simpletest/simpletest.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.install,v
retrieving revision 1.4
diff -u -r1.4 simpletest.install
--- modules/simpletest/simpletest.install	24 Jun 2008 21:51:02 -0000	1.4
+++ modules/simpletest/simpletest.install	1 Jul 2008 05:07:21 -0000
@@ -139,7 +139,7 @@
 function simpletest_schema() {
   $schema['simpletest'] = array(
     'description' => t('Stores simpletest messages'),
-    'fields' => array(
+    'columns' => array(
       'message_id'  => array(
         'type' => 'serial',
         'not null' => TRUE,
@@ -207,7 +207,7 @@
   );
   $schema['simpletest_test_id'] = array(
     'description' => t('Stores simpletest test IDs.'),
-    'fields' => array(
+    'columns' => array(
       'message_id'  => array(
         'type' => 'serial',
         'not null' => TRUE,
@@ -227,7 +227,7 @@
   $schema = array();
 
   $schema['simpletest'] = array(
-    'fields' => array(
+    'columns' => array(
       'message_id'  => array('type' => 'serial', 'not null' => TRUE),
       'test_id' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
       'test_class' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
@@ -245,7 +245,7 @@
   );
 
   $schema['simpletest_test_id'] = array(
-    'fields' => array(
+    'columns' => array(
       'message_id'  => array('type' => 'serial', 'not null' => TRUE),
     ),
     'primary key' => array('message_id'),
Index: modules/aggregator/aggregator.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.install,v
retrieving revision 1.16
diff -u -r1.16 aggregator.install
--- modules/aggregator/aggregator.install	15 May 2008 21:27:32 -0000	1.16
+++ modules/aggregator/aggregator.install	1 Jul 2008 05:07:01 -0000
@@ -28,7 +28,7 @@
 function aggregator_schema() {
   $schema['aggregator_category'] = array(
     'description' => t('Stores categories for aggregator feeds and feed items.'),
-    'fields' => array(
+    'columns' => array(
       'cid'  => array(
         'type' => 'serial',
         'not null' => TRUE,
@@ -63,7 +63,7 @@
 
   $schema['aggregator_category_feed'] = array(
     'description' => t('Bridge table; maps feeds to categories.'),
-    'fields' => array(
+    'columns' => array(
       'fid' => array(
         'type' => 'int',
         'not null' => TRUE,
@@ -85,7 +85,7 @@
 
   $schema['aggregator_category_item'] = array(
     'description' => t('Bridge table; maps feed items to categories.'),
-    'fields' => array(
+    'columns' => array(
       'iid' => array(
         'type' => 'int',
         'not null' => TRUE,
@@ -107,7 +107,7 @@
 
   $schema['aggregator_feed'] = array(
     'description' => t('Stores feeds to be parsed by the aggregator.'),
-    'fields' => array(
+    'columns' => array(
       'fid' => array(
         'type' => 'serial',
         'not null' => TRUE,
@@ -188,7 +188,7 @@
 
   $schema['aggregator_item'] = array(
     'description' => t('Stores the individual items imported from feeds.'),
-    'fields' => array(
+    'columns' => array(
       'iid'  => array(
         'type' => 'serial',
         'not null' => TRUE,
Index: modules/node/node.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.install,v
retrieving revision 1.6
diff -u -r1.6 node.install
--- modules/node/node.install	15 Apr 2008 08:39:03 -0000	1.6
+++ modules/node/node.install	1 Jul 2008 05:07:12 -0000
@@ -7,7 +7,7 @@
 function node_schema() {
   $schema['node'] = array(
     'description' => t('The base table for nodes.'),
-    'fields' => array(
+    'columns' => array(
       'nid' => array(
         'description' => t('The primary identifier for a node.'),
         'type' => 'serial',
@@ -124,7 +124,7 @@
 
   $schema['node_access'] = array(
     'description' => t('Identifies which realm/grant pairs a user must possess in order to view, update, or delete specific nodes.'),
-    'fields' => array(
+    'columns' => array(
       'nid' => array(
         'description' => t('The {node}.nid this record affects.'),
         'type' => 'int',
@@ -176,7 +176,7 @@
 
   $schema['node_counter'] = array(
     'description' => t('Access statistics for {node}s.'),
-    'fields' => array(
+    'columns' => array(
       'nid' => array(
         'description' => t('The {node}.nid for these statistics.'),
         'type' => 'int',
@@ -212,7 +212,7 @@
 
   $schema['node_revisions'] = array(
     'description' => t('Stores information about each saved version of a {node}.'),
-    'fields' => array(
+    'columns' => array(
       'nid' => array(
         'description' => t('The {node} this version belongs to.'),
         'type' => 'int',
@@ -279,7 +279,7 @@
 
   $schema['node_type'] = array(
     'description' => t('Stores information about all defined {node} types.'),
-    'fields' => array(
+    'columns' => array(
       'type' => array(
         'description' => t('The machine-readable name of this type.'),
         'type' => 'varchar',
@@ -312,7 +312,7 @@
         'size' => 'medium',
       ),
       'has_title' => array(
-        'description' => t('Boolean indicating whether this type uses the {node}.title field.'),
+        'description' => t('Boolean indicating whether this type uses the {node}.title column.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
@@ -326,7 +326,7 @@
         'default' => '',
       ),
       'has_body' => array(
-        'description' => t('Boolean indicating whether this type uses the {node_revisions}.body field.'),
+        'description' => t('Boolean indicating whether this type uses the {node_revisions}.body column.'),
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.967
diff -u -r1.967 node.module
--- modules/node/node.module	26 May 2008 17:12:55 -0000	1.967
+++ modules/node/node.module	1 Jul 2008 05:07:18 -0000
@@ -553,7 +553,7 @@
  *   The new node type of the nodes.
  *
  * @return
- *   The number of nodes whose node type field was modified.
+ *   The number of nodes whose node type column was modified.
  */
 function node_type_update_nodes($old_type, $type) {
   db_query("UPDATE {node} SET type = '%s' WHERE type = '%s'", $type, $old_type);
@@ -755,28 +755,28 @@
     return FALSE;
   }
 
-  // Retrieve a field list based on the site's schema.
-  $fields = drupal_schema_fields_sql('node', 'n');
-  $fields = array_merge($fields, drupal_schema_fields_sql('node_revisions', 'r'));
-  $fields = array_merge($fields, array('u.name', 'u.picture', 'u.data'));
-  // Remove fields not needed in the query: n.vid and r.nid are redundant,
+  // Retrieve a column list based on the site's schema.
+  $columns = drupal_schema_columns_sql('node', 'n');
+  $columns = array_merge($columns, drupal_schema_columns_sql('node_revisions', 'r'));
+  $columns = array_merge($columns, array('u.name', 'u.picture', 'u.data'));
+  // Remove columns not needed in the query: n.vid and r.nid are redundant,
   // n.title is unnecessary because the node title comes from the
   // node_revisions table.  We'll keep r.vid, r.title, and n.nid.
-  $fields = array_diff($fields, array('n.vid', 'n.title', 'r.nid'));
-  $fields = implode(', ', $fields);
-  // Rename timestamp field for clarity.
-  $fields = str_replace('r.timestamp', 'r.timestamp AS revision_timestamp', $fields);
+  $columns = array_diff($columns, array('n.vid', 'n.title', 'r.nid'));
+  $columns = implode(', ', $columns);
+  // Rename timestamp column for clarity.
+  $columns = str_replace('r.timestamp', 'r.timestamp AS revision_timestamp', $columns);
   // Change name of revision uid so it doesn't conflict with n.uid.
-  $fields = str_replace('r.uid', 'r.uid AS revision_uid', $fields);
+  $columns = str_replace('r.uid', 'r.uid AS revision_uid', $columns);
 
   // Retrieve the node.
   // No db_rewrite_sql is applied so as to get complete indexing for search.
   if ($revision) {
     array_unshift($arguments, $revision);
-    $node = db_fetch_object(db_query('SELECT ' . $fields . ' FROM {node} n INNER JOIN {users} u ON u.uid = n.uid INNER JOIN {node_revisions} r ON r.nid = n.nid AND r.vid = %d WHERE ' . $cond, $arguments));
+    $node = db_fetch_object(db_query('SELECT ' . $columns . ' FROM {node} n INNER JOIN {users} u ON u.uid = n.uid INNER JOIN {node_revisions} r ON r.nid = n.nid AND r.vid = %d WHERE ' . $cond, $arguments));
   }
   else {
-    $node = db_fetch_object(db_query('SELECT ' . $fields . ' FROM {node} n INNER JOIN {users} u ON u.uid = n.uid INNER JOIN {node_revisions} r ON r.vid = n.vid WHERE ' . $cond, $arguments));
+    $node = db_fetch_object(db_query('SELECT ' . $columns . ' FROM {node} n INNER JOIN {users} u ON u.uid = n.uid INNER JOIN {node_revisions} r ON r.vid = n.vid WHERE ' . $cond, $arguments));
   }
 
   if ($node && $node->nid) {
@@ -2224,8 +2224,8 @@
 /**
  * Implementation of hook_db_rewrite_sql
  */
-function node_db_rewrite_sql($query, $primary_table, $primary_field) {
-  if ($primary_field == 'nid' && !node_access_view_all_nodes()) {
+function node_db_rewrite_sql($query, $primary_table, $primary_column) {
+  if ($primary_column == 'nid' && !node_access_view_all_nodes()) {
     $return['join'] = _node_access_join_sql($primary_table);
     $return['where'] = _node_access_where_sql();
     $return['distinct'] = 1;
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.604
diff -u -r1.604 system.module
--- modules/system/system.module	28 Jun 2008 12:37:52 -0000	1.604
+++ modules/system/system.module	1 Jul 2008 05:07:34 -0000
@@ -1490,8 +1490,8 @@
   $row = array();
   $instances_present = db_fetch_object(db_query("SELECT aid FROM {actions} WHERE parameters != ''"));
   $header = array(
-    array('data' => t('Action type'), 'field' => 'type'),
-    array('data' => t('Description'), 'field' => 'description'),
+    array('data' => t('Action type'), 'column' => 'type'),
+    array('data' => t('Description'), 'column' => 'description'),
     array('data' => $instances_present ? t('Operations') : '', 'colspan' => '2')
   );
   $sql = 'SELECT * FROM {actions}';
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.255
diff -u -r1.255 system.install
--- modules/system/system.install	25 Jun 2008 09:12:25 -0000	1.255
+++ modules/system/system.install	1 Jul 2008 05:07:30 -0000
@@ -429,7 +429,7 @@
   // and variable_set() for overcoming some database specific limitations.
   $schema['variable'] = array(
     'description' => t('Named variable/value pairs created by Drupal core or any other module or theme. All variables are cached in memory at the start of every Drupal request so developers should not be careless about what is stored here.'),
-    'fields' => array(
+    'columns' => array(
       'name' => array(
         'description' => t('The name of the variable.'),
         'type' => 'varchar',
@@ -449,7 +449,7 @@
 
   $schema['actions'] = array(
     'description' => t('Stores action information.'),
-    'fields' => array(
+    'columns' => array(
       'aid' => array(
         'description' => t('Primary Key: Unique actions ID.'),
         'type' => 'varchar',
@@ -490,7 +490,7 @@
 
   $schema['actions_aid'] = array(
     'description' => t('Stores action IDs for non-default actions.'),
-    'fields' => array(
+    'columns' => array(
       'aid' => array(
         'description' => t('Primary Key: Unique actions ID.'),
         'type' => 'serial',
@@ -503,7 +503,7 @@
 
   $schema['batch'] = array(
     'description' => t('Stores details about batches (processes that run in multiple HTTP requests).'),
-    'fields' => array(
+    'columns' => array(
       'bid' => array(
         'description' => t('Primary Key: Unique batch ID.'),
         'type' => 'serial',
@@ -536,7 +536,7 @@
 
   $schema['blocked_ips'] = array(
     'description' => t('Stores blocked IP addresses.'),
-    'fields' => array(
+    'columns' => array(
        'iid' => array(
         'description' => t('Primary Key: unique ID for IP addresses.'),
         'type' => 'serial',
@@ -559,7 +559,7 @@
 
   $schema['cache'] = array(
     'description' => t('Generic cache table for caching things not separated out into their own tables. Contributed modules may also use this to store cached items.'),
-    'fields' => array(
+    'columns' => array(
       'cid' => array(
         'description' => t('Primary Key: Unique cache ID.'),
         'type' => 'varchar',
@@ -615,7 +615,7 @@
 
   $schema['files'] = array(
     'description' => t('Stores information for uploaded files.'),
-    'fields' => array(
+    'columns' => array(
       'fid' => array(
         'description' => t('Primary Key: Unique files ID.'),
         'type' => 'serial',
@@ -681,7 +681,7 @@
 
   $schema['flood'] = array(
     'description' => t('Flood controls the threshold of events, such as the number of contact attempts.'),
-    'fields' => array(
+    'columns' => array(
       'fid' => array(
         'description' => t('Unique flood event ID.'),
         'type' => 'serial',
@@ -716,7 +716,7 @@
 
   $schema['history'] = array(
     'description' => t('A record of which {users} have read which {node}s.'),
-    'fields' => array(
+    'columns' => array(
       'uid' => array(
         'description' => t('The {users}.uid that read the {node} nid.'),
         'type' => 'int',
@@ -743,7 +743,7 @@
   );
   $schema['menu_router'] = array(
     'description' => t('Maps paths to various callbacks (access, page and title)'),
-    'fields' => array(
+    'columns' => array(
       'path' => array(
         'description' => t('Primary Key: the Drupal path this entry describes'),
         'type' => 'varchar',
@@ -878,7 +878,7 @@
 
   $schema['menu_links'] = array(
     'description' => t('Contains the individual links within a menu.'),
-    'fields' => array(
+    'columns' => array(
      'menu_name' => array(
         'description' => t("The menu name. All links with the same menu name (such as 'navigation') are part of the same menu."),
         'type' => 'varchar',
@@ -1062,7 +1062,7 @@
 
   $schema['registry'] = array(
     'description' => t("Each record is a function, class, or interface name and the file it is in."),
-    'fields' => array(
+    'columns' => array(
       'name'   => array(
         'description' => t('The name of the function, class, or interface.'),
         'type' => 'varchar',
@@ -1089,7 +1089,7 @@
 
   $schema['registry_file'] = array(
     'description' => t("Files parsed to build the registry."),
-    'fields' => array(
+    'columns' => array(
       'filename'   => array(
         'description' => t('Path to the file.'),
         'type' => 'varchar',
@@ -1108,7 +1108,7 @@
 
   $schema['sessions'] = array(
     'description' => t("Drupal's session handlers read and write into the sessions table. Each record represents a user session, either anonymous or authenticated."),
-    'fields' => array(
+    'columns' => array(
       'uid' => array(
         'description' => t('The {users}.uid corresponding to a session, or 0 for anonymous user.'),
         'type' => 'int',
@@ -1157,7 +1157,7 @@
 
   $schema['system'] = array(
     'description' => t("A list of all modules, themes, and theme engines that are or have been installed in Drupal's file system."),
-    'fields' => array(
+    'columns' => array(
       'filename' => array(
         'description' => t('The path of the primary file for this item, relative to the Drupal root; e.g. modules/node/node.module.'),
         'type' => 'varchar',
@@ -1233,7 +1233,7 @@
 
   $schema['url_alias'] = array(
     'description' => t('A list of URL aliases for Drupal paths; a user may visit either the source or destination path.'),
-    'fields' => array(
+    'columns' => array(
       'pid' => array(
         'description' => t('A unique path alias identifier.'),
         'type' => 'serial',
@@ -1329,7 +1329,7 @@
   $ret = array();
 
   // Add vid to term-node relation.  The schema says it is unsigned.
-  db_add_field($ret, 'term_node', 'vid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
+  db_add_column($ret, 'term_node', 'vid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
   db_drop_primary_key($ret, 'term_node');
   db_add_primary_key($ret, 'term_node', array('vid', 'tid', 'nid'));
   db_add_index($ret, 'term_node', 'vid', array('vid'));
@@ -1344,7 +1344,7 @@
 function system_update_6002() {
   $ret = array();
   db_drop_primary_key($ret, 'variable');
-  db_change_field($ret, 'variable', 'name', 'name', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''));
+  db_change_column($ret, 'variable', 'name', 'name', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''));
   db_add_primary_key($ret, 'variable', array('name'));
   return $ret;
 }
@@ -1462,7 +1462,7 @@
 function system_update_6008() {
   $ret = array();
   $ret[] = update_sql('UPDATE {system} SET owner = description');
-  db_drop_field($ret, 'system', 'description');
+  db_drop_column($ret, 'system', 'description');
 
   // Rebuild system table contents.
   module_rebuild_cache();
@@ -1496,14 +1496,14 @@
 /**
  * Add variable replacement for watchdog messages.
  *
- * The variables field is NOT NULL and does not have a default value.
+ * The variables column is NOT NULL and does not have a default value.
  * Existing log messages should not be translated in the new system,
  * so we insert 'N;' (serialize(NULL)) as the temporary default but
  * then remove the default value to match the schema.
  */
 function system_update_6010() {
   $ret = array();
-  db_add_field($ret, 'watchdog', 'variables', array('type' => 'text', 'size' => 'big', 'not null' => TRUE, 'initial' => 'N;'));
+  db_add_column($ret, 'watchdog', 'variables', array('type' => 'text', 'size' => 'big', 'not null' => TRUE, 'initial' => 'N;'));
   return $ret;
 }
 
@@ -1525,7 +1525,7 @@
 }
 
 /**
- * Add serialized field to cache tables.  This is now handled directly
+ * Add serialized column to cache tables.  This is now handled directly
  * by update.php, so this function is a no-op.
  */
 function system_update_6012() {
@@ -1704,26 +1704,26 @@
     case 'pgsql':
       // Remove default ''.
       if (db_table_exists('aggregator_feed')) {
-        db_field_set_no_default($ret, 'aggregator_feed', 'description');
-        db_field_set_no_default($ret, 'aggregator_feed', 'image');
+        db_column_set_no_default($ret, 'aggregator_feed', 'description');
+        db_column_set_no_default($ret, 'aggregator_feed', 'image');
       }
-      db_field_set_no_default($ret, 'blocks', 'pages');
+      db_column_set_no_default($ret, 'blocks', 'pages');
       if (db_table_exists('contact')) {
-        db_field_set_no_default($ret, 'contact', 'recipients');
-        db_field_set_no_default($ret, 'contact', 'reply');
+        db_column_set_no_default($ret, 'contact', 'recipients');
+        db_column_set_no_default($ret, 'contact', 'reply');
       }
-      db_field_set_no_default($ret, 'watchdog', 'location');
-      db_field_set_no_default($ret, 'node_revisions', 'body');
-      db_field_set_no_default($ret, 'node_revisions', 'teaser');
-      db_field_set_no_default($ret, 'node_revisions', 'log');
+      db_column_set_no_default($ret, 'watchdog', 'location');
+      db_column_set_no_default($ret, 'node_revisions', 'body');
+      db_column_set_no_default($ret, 'node_revisions', 'teaser');
+      db_column_set_no_default($ret, 'node_revisions', 'log');
 
       // Update from pgsql 'float' (which means 'double precision') to
       // schema 'float' (which in pgsql means 'real').
       if (db_table_exists('search_index')) {
-        db_change_field($ret, 'search_index', 'score', 'score', array('type' => 'float'));
+        db_change_column($ret, 'search_index', 'score', 'score', array('type' => 'float'));
       }
       if (db_table_exists('search_total')) {
-        db_change_field($ret, 'search_total', 'count', 'count', array('type' => 'float'));
+        db_change_column($ret, 'search_total', 'count', 'count', array('type' => 'float'));
       }
 
       // Replace unique index dst_language with a unique constraint.  The
@@ -1745,7 +1745,7 @@
 
       // Make boxes.bid unsigned.
       db_drop_primary_key($ret, 'boxes');
-      db_change_field($ret, 'boxes', 'bid', 'bid', array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), array('primary key' => array('bid')));
+      db_change_column($ret, 'boxes', 'bid', 'bid', array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), array('primary key' => array('bid')));
 
       // Fix primary key
       db_drop_primary_key($ret, 'node');
@@ -1763,28 +1763,28 @@
 
       // Change to size => small.
       if (db_table_exists('boxes')) {
-        db_change_field($ret, 'boxes', 'format', 'format', array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0));
+        db_change_column($ret, 'boxes', 'format', 'format', array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0));
       }
 
       // Change to size => small.
       // Rename index 'lid' to 'nid'.
       if (db_table_exists('comments')) {
-        db_change_field($ret, 'comments', 'format', 'format', array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0));
+        db_change_column($ret, 'comments', 'format', 'format', array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0));
         db_drop_index($ret, 'comments', 'lid');
         db_add_index($ret, 'comments', 'nid', array('nid'));
       }
 
       // Change to size => small.
-      db_change_field($ret, 'cache', 'serialized', 'serialized', array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0));
-      db_change_field($ret, 'cache_filter', 'serialized', 'serialized', array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0));
-      db_change_field($ret, 'cache_page', 'serialized', 'serialized', array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0));
-      db_change_field($ret, 'cache_form', 'serialized', 'serialized', array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0));
+      db_change_column($ret, 'cache', 'serialized', 'serialized', array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0));
+      db_change_column($ret, 'cache_filter', 'serialized', 'serialized', array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0));
+      db_change_column($ret, 'cache_page', 'serialized', 'serialized', array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0));
+      db_change_column($ret, 'cache_form', 'serialized', 'serialized', array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0));
 
       // Remove default => 0, set auto increment.
       $new_uid = 1 + db_result(db_query('SELECT MAX(uid) FROM {users}'));
       $ret[] = update_sql('UPDATE {users} SET uid = ' . $new_uid . ' WHERE uid = 0');
       db_drop_primary_key($ret, 'users');
-      db_change_field($ret, 'users', 'uid', 'uid', array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), array('primary key' => array('uid')));
+      db_change_column($ret, 'users', 'uid', 'uid', array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), array('primary key' => array('uid')));
       $ret[] = update_sql('UPDATE {users} SET uid = 0 WHERE uid = ' . $new_uid);
 
       // Special field names.
@@ -1793,7 +1793,7 @@
       foreach (array('boxes', 'files', 'node', 'node_revisions') as $table) {
         $field = isset($map[$table]) ? $map[$table] : $table[0] . 'id';
         db_drop_primary_key($ret, $table);
-        db_change_field($ret, $table, $field, $field, array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), array('primary key' => array($field)));
+        db_change_column($ret, $table, $field, $field, array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), array('primary key' => array($field)));
       }
 
       break;
@@ -1809,7 +1809,7 @@
   $ret = array();
 
   $schema['menu_router'] = array(
-    'fields' => array(
+    'columns' => 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' => ''),
@@ -1839,7 +1839,7 @@
   );
 
   $schema['menu_links'] = array(
-    'fields' => array(
+    'columns' => array(
       'menu_name'    => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
       'mlid'         => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
       'plid'         => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
@@ -1905,13 +1905,13 @@
   );
   // Multi-part update
   if (!isset($_SESSION['system_update_6021'])) {
-    db_add_field($ret, 'menu', 'converted', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'));
+    db_add_column($ret, 'menu', 'converted', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'));
     $_SESSION['system_update_6021_max'] = db_result(db_query('SELECT COUNT(*) FROM {menu}'));
     $_SESSION['menu_menu_map'] = array(1 => 'navigation');
     // 0 => FALSE is for new menus, 1 => FALSE is for the navigation.
     $_SESSION['menu_item_map'] = array(0 => FALSE, 1 => FALSE);
     $table = array(
-      'fields' => array(
+      'columns' => array(
         'menu_name'   => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
         'title'       => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
         'description' => array('type' => 'text', 'not null' => FALSE),
@@ -2114,9 +2114,9 @@
 
   // Rename the nid field to vid, add status and timestamp fields, and indexes.
   db_drop_index($ret, 'files', 'nid');
-  db_change_field($ret, 'files', 'nid', 'uid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
-  db_add_field($ret, 'files', 'status', array('type' => 'int', 'not null' => TRUE, 'default' => 0));
-  db_add_field($ret, 'files', 'timestamp', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
+  db_change_column($ret, 'files', 'nid', 'uid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
+  db_add_column($ret, 'files', 'status', array('type' => 'int', 'not null' => TRUE, 'default' => 0));
+  db_add_column($ret, 'files', 'timestamp', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
   db_add_index($ret, 'files', 'uid', array('uid'));
   db_add_index($ret, 'files', 'status', array('status'));
   db_add_index($ret, 'files', 'timestamp', array('timestamp'));
@@ -2128,7 +2128,7 @@
   db_drop_primary_key($ret, 'file_revisions');
   db_drop_index($ret, 'file_revisions', 'vid');
   db_rename_table($ret, 'file_revisions', 'upload');
-  db_add_field($ret, 'upload', 'nid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
+  db_add_column($ret, 'upload', 'nid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
   db_add_index($ret, 'upload', 'nid', array('nid'));
   db_add_primary_key($ret, 'upload', array('vid', 'fid'));
   db_add_index($ret, 'upload', 'fid', array('fid'));
@@ -2148,7 +2148,7 @@
 
   // nid is DEFAULT 0
   db_drop_index($ret, 'node_revisions', 'nid');
-  db_change_field($ret, 'node_revisions', 'nid', 'nid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
+  db_change_column($ret, 'node_revisions', 'nid', 'nid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
   db_add_index($ret, 'node_revisions', 'nid', array('nid'));
   return $ret;
 }
@@ -2158,8 +2158,8 @@
  */
 function system_update_6024() {
   $ret = array();
-  db_add_field($ret, 'node', 'tnid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
-  db_add_field($ret, 'node', 'translate', array('type' => 'int', 'not null' => TRUE, 'default' => 0));
+  db_add_column($ret, 'node', 'tnid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
+  db_add_column($ret, 'node', 'translate', array('type' => 'int', 'not null' => TRUE, 'default' => 0));
   db_add_index($ret, 'node', 'tnid', array('tnid'));
   db_add_index($ret, 'node', 'translate', array('translate'));
   return $ret;
@@ -2171,9 +2171,9 @@
 function system_update_6025() {
   $ret = array();
   db_drop_index($ret, 'node', 'node_title_type');
-  db_change_field($ret, 'node', 'title', 'title', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
+  db_change_column($ret, 'node', 'title', 'title', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
   db_add_index($ret, 'node', 'node_title_type', array('title', array('type', 4)));
-  db_change_field($ret, 'node_revisions', 'title', 'title', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
+  db_change_column($ret, 'node_revisions', 'title', 'title', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
   return $ret;
 }
 
@@ -2196,7 +2196,7 @@
   $ret = array();
 
   // Create the blocks.cache column.
-  db_add_field($ret, 'blocks', 'cache', array('type' => 'int', 'not null' => TRUE, 'default' => 1, 'size' => 'tiny'));
+  db_add_column($ret, 'blocks', 'cache', array('type' => 'int', 'not null' => TRUE, 'default' => 1, 'size' => 'tiny'));
 
   // The cache_block table is created in update_fix_d6_requirements() since
   // calls to cache_clear_all() would otherwise cause warnings.
@@ -2258,7 +2258,7 @@
   }
 
   $schema['actions'] = array(
-    'fields' => array(
+    'columns' => 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' => ''),
@@ -2269,7 +2269,7 @@
   );
 
   $schema['actions_aid'] = array(
-    'fields' => array(
+    'columns' => array(
       'aid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
     ),
     'primary key' => array('aid'),
@@ -2297,7 +2297,7 @@
   $ret = array();
   if (db_table_exists('profile_fields')) {
     db_drop_unique_key($ret, 'profile_fields', 'name');
-    db_change_field($ret, 'profile_fields', 'name', 'name', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''));
+    db_change_column($ret, 'profile_fields', 'name', 'name', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''));
     db_add_unique_key($ret, 'profile_fields', 'name', array('name'));
   }
   return $ret;
@@ -2309,7 +2309,7 @@
 function system_update_6033() {
   $ret = array();
   if (db_table_exists('node_comment_statistics')) {
-    // On pgsql but not mysql, db_change_field() drops all keys
+    // On pgsql but not mysql, db_change_column() drops all keys
     // involving the changed field, which in this case is the primary
     // key.  The normal approach is explicitly drop the pkey, change the
     // field, and re-create the pkey.
@@ -2318,11 +2318,11 @@
     // drop the pkey because on mysql auto-increment fields must be
     // included in at least one key or index.
     //
-    // Since we cannot drop the pkey before db_change_field(), after
-    // db_change_field() we may or may not still have a pkey.  The
+    // Since we cannot drop the pkey before db_change_column(), after
+    // db_change_column() we may or may not still have a pkey.  The
     // simple way out is to re-create the pkey only when using pgsql.
     // Realistic requirements trump idealistic purity.
-    db_change_field($ret, 'node_comment_statistics', 'nid', 'nid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
+    db_change_column($ret, 'node_comment_statistics', 'nid', 'nid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
     if ($GLOBALS['db_type'] == 'pgsql') {
       db_add_primary_key($ret, 'node_comment_statistics', array('nid'));
     }
@@ -2368,19 +2368,19 @@
   $ret = array();
   if (db_table_exists('search_index')) {
     // Create the search_dataset.reindex column.
-    db_add_field($ret, 'search_dataset', 'reindex', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
+    db_add_column($ret, 'search_dataset', 'reindex', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
 
     // Drop the search_index.from fields which are no longer used.
     db_drop_index($ret, 'search_index', 'from_sid_type');
-    db_drop_field($ret, 'search_index', 'fromsid');
-    db_drop_field($ret, 'search_index', 'fromtype');
+    db_drop_column($ret, 'search_index', 'fromsid');
+    db_drop_column($ret, 'search_index', 'fromtype');
 
     // Drop the search_dataset.sid_type index, so that it can be made unique.
     db_drop_index($ret, 'search_dataset', 'sid_type');
 
     // Create the search_node_links Table.
     $search_node_links_schema = array(
-      'fields' => array(
+      'columns' => array(
         'sid'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
         'type'     => array('type' => 'varchar', 'length' => 16, 'not null' => TRUE, 'default' => ''),
         'nid'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
@@ -2431,7 +2431,7 @@
  */
 function system_update_6037() {
   $ret = array();
-  db_change_field($ret, 'blocks', 'region', 'region', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''));
+  db_change_column($ret, 'blocks', 'region', 'region', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''));
   $ret[] = update_sql("UPDATE {blocks} SET region = '' WHERE status = 0");
   return $ret;
 }
@@ -2474,7 +2474,7 @@
 function system_update_6040() {
   $ret = array();
   if (db_table_exists('upload')) {
-    db_add_field($ret, 'upload', 'weight', array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'));
+    db_add_column($ret, 'upload', 'weight', array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'));
   }
   return $ret;
 }
@@ -2518,7 +2518,7 @@
   db_add_index($ret, 'history', 'nid', array('nid'));
   // Change length of theme field in {blocks} to be consistent with module, and
   // to avoid a MySQL error regarding a too-long index.  Also add new indices.
-  db_change_field($ret, 'blocks', 'theme', 'theme', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),array(
+  db_change_column($ret, 'blocks', 'theme', 'theme', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''),array(
                   'unique keys' => array('tmd' => array('theme', 'module', 'delta'),),
                   'indexes' => array('list' => array('theme', 'status', 'region', 'weight', 'module'),),));
   db_add_index($ret, 'blocks_roles', 'rid', array('rid'));
@@ -2562,8 +2562,8 @@
   if (db_table_exists('profile_values')) {
     db_drop_index($ret, 'profile_values', 'uid');
     db_drop_index($ret, 'profile_values', 'fid');
-    db_change_field($ret,'profile_values' ,'fid', 'fid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,), array('indexes' => array('fid' => array('fid'),)));
-    db_change_field($ret,'profile_values' ,'uid', 'uid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,));
+    db_change_column($ret,'profile_values' ,'fid', 'fid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,), array('indexes' => array('fid' => array('fid'),)));
+    db_change_column($ret,'profile_values' ,'uid', 'uid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0,));
     db_add_primary_key($ret, 'profile_values', array('uid', 'fid'));
   }
   // Alter a statistics module table to add an index.
@@ -2748,7 +2748,7 @@
   $ret = array();
   $schema['blocked_ips'] = array(
     'description' => t('Stores blocked IP addresses.'),
-    'fields' => array(
+    'columns' => array(
       'iid' => array(
         'description' => t('Primary Key: unique ID for IP addresses.'),
         'type' => 'serial',
@@ -2900,8 +2900,8 @@
  */
 function system_update_7005() {
   $ret = array();
-  db_drop_field($ret, 'blocks', 'throttle');
-  db_drop_field($ret, 'system', 'throttle');
+  db_drop_column($ret, 'blocks', 'throttle');
+  db_drop_column($ret, 'system', 'throttle');
   variable_del('throttle_user');
   variable_del('throttle_anonymous');
   variable_del('throttle_level');
@@ -2916,9 +2916,9 @@
  */
 function system_update_7006() {
   $ret = array();
-  db_drop_field($ret, 'menu_router', 'file');
+  db_drop_column($ret, 'menu_router', 'file');
   $schema['registry'] = array(
-    'fields' => array(
+    'columns' => array(
       'name'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
       'type'   => array('type' => 'varchar', 'length' => 9, 'not null' => TRUE, 'default' => ''),
       'filename'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
@@ -2926,14 +2926,14 @@
     'primary key' => array('name', 'type'),
   );
   $schema['registry_file'] = array(
-    'fields' => array(
+    'columns' => array(
       'filename'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
       'md5'   => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
     ),
     'primary key' => array('filename'),
   );
   $schema['cache_registry'] = array(
-    'fields' => array(
+    'columns' => 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),
@@ -2961,7 +2961,7 @@
   $ret = array();
 
   $schema['role_permission'] = array(
-    'fields' => array(
+    'columns' => array(
       'rid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
@@ -3004,15 +3004,15 @@
   $ret = array();
   if (db_table_exists('poll_votes')) {
     // Add chid column and convert existing votes.
-    db_add_field($ret, 'poll_votes', 'chid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
+    db_add_column($ret, 'poll_votes', 'chid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
     db_add_index($ret, 'poll_votes', 'chid', array('chid'));
     $ret[] = update_sql("UPDATE {poll_votes} v SET chid = (SELECT chid FROM {poll_choices} c WHERE v.chorder = c.chorder AND v.nid = c.nid)");
     // Remove old chorder column.
-    db_drop_field($ret, 'poll_votes', 'chorder');
+    db_drop_column($ret, 'poll_votes', 'chorder');
   }
   if (db_table_exists('poll_choices')) {
     // Change the chorder column to weight in poll_choices.
-    db_change_field($ret, 'poll_choices', 'chorder', 'weight', array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'));
+    db_change_column($ret, 'poll_choices', 'chorder', 'weight', array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'));
   }
   return $ret;
 }
Index: modules/book/book.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.install,v
retrieving revision 1.22
diff -u -r1.22 book.install
--- modules/book/book.install	15 May 2008 21:19:24 -0000	1.22
+++ modules/book/book.install	1 Jul 2008 05:07:02 -0000
@@ -63,7 +63,7 @@
   if (!isset($_SESSION['book_update_6000'])) {
 
     $schema['book'] = array(
-      'fields' => array(
+      'columns' => array(
         'mlid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
         'nid'     => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
         'bid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
@@ -110,7 +110,7 @@
     if (db_result(db_query("SELECT COUNT(*) FROM {book}"))) {
       // Temporary table for the old book hierarchy; we'll discard revision info.
       $schema['book_temp'] = array(
-        'fields' => array(
+        'columns' => array(
           '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')
@@ -252,7 +252,7 @@
 function book_schema() {
   $schema['book'] = array(
   'description' => t('Stores book outline information. Uniquely connects each node in the outline to a link in {menu_links}'),
-    'fields' => array(
+    'columns' => array(
       'mlid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
Index: modules/trigger/trigger.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.install,v
retrieving revision 1.5
diff -u -r1.5 trigger.install
--- modules/trigger/trigger.install	28 Dec 2007 12:02:52 -0000	1.5
+++ modules/trigger/trigger.install	1 Jul 2008 05:07:35 -0000
@@ -26,7 +26,7 @@
 function trigger_schema() {
   $schema['trigger_assignments'] = array(
     'description' => t('Maps trigger to hook and operation assignments from trigger.module.'),
-    'fields' => array(
+    'columns' => array(
       'hook' => array(
         'type' => 'varchar',
         'length' => 32,
Index: modules/poll/poll.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.install,v
retrieving revision 1.15
diff -u -r1.15 poll.install
--- modules/poll/poll.install	15 May 2008 20:55:58 -0000	1.15
+++ modules/poll/poll.install	1 Jul 2008 05:07:19 -0000
@@ -23,7 +23,7 @@
 function poll_schema() {
   $schema['poll'] = array(
     'description' => t('Stores poll-specific information for poll nodes.'),
-    'fields' => array(
+    'columns' => array(
       'nid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
@@ -50,7 +50,7 @@
 
   $schema['poll_choices'] = array(
     'description' => t('Stores information about all choices for all {poll}s.'),
-    'fields' => array(
+    'columns' => array(
       'chid' => array(
         'type' => 'serial',
         'unsigned' => TRUE,
@@ -93,7 +93,7 @@
 
   $schema['poll_votes'] = array(
     'description' => t('Stores per-{users} votes for each {poll}.'),
-    'fields' => array(
+    'columns' => array(
       'chid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
Index: modules/poll/poll.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.pages.inc,v
retrieving revision 1.6
diff -u -r1.6 poll.pages.inc
--- modules/poll/poll.pages.inc	15 May 2008 20:55:58 -0000	1.6
+++ modules/poll/poll.pages.inc	1 Jul 2008 05:07:19 -0000
@@ -31,9 +31,9 @@
   drupal_set_title(check_plain($node->title));
   $output = t('This table lists all the recorded votes for this poll. If anonymous users are allowed to vote, they will be identified by the IP address of the computer they used when they voted.');
 
-  $header[] = array('data' => t('Visitor'), 'field' => 'u.name');
-  $header[] = array('data' => t('Vote'), 'field' => 'pv.chorder');
-  $header[] = array('data' => t('Vote'), 'field' => 'pc.weight');
+  $header[] = array('data' => t('Visitor'), 'column' => 'u.name');
+  $header[] = array('data' => t('Vote'), 'column' => 'pv.chorder');
+  $header[] = array('data' => t('Vote'), 'column' => 'pc.weight');
 
   $result = pager_query("SELECT pv.chid, pv.uid, pv.hostname, u.name FROM {poll_votes} pv INNER JOIN {poll_choices} pc ON pv.chid = pc.chid LEFT JOIN {users} u ON pv.uid = u.uid WHERE pv.nid = %d". tablesort_sql($header), 20, 0, NULL, $node->nid);
   $rows = array();
Index: modules/filter/filter.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.install,v
retrieving revision 1.9
diff -u -r1.9 filter.install
--- modules/filter/filter.install	14 Apr 2008 17:48:37 -0000	1.9
+++ modules/filter/filter.install	1 Jul 2008 05:07:08 -0000
@@ -7,7 +7,7 @@
 function filter_schema() {
   $schema['filters'] = array(
     'description' => t('Table that maps filters (HTML corrector) to input formats (Filtered HTML).'),
-    'fields' => array(
+    'columns' => array(
       'fid' => array(
         'type' => 'serial',
         'not null' => TRUE,
@@ -51,7 +51,7 @@
   );
   $schema['filter_formats'] = array(
     'description' => t('Stores input formats: custom groupings of filters, such as Filtered HTML.'),
-    'fields' => array(
+    'columns' => array(
       'format' => array(
         'type' => 'serial',
         'not null' => TRUE,
@@ -103,7 +103,7 @@
  */
 function filter_update_7000() {
   $ret = array();
-  db_add_field($ret, 'filter_formats', 'weight', array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'));
+  db_add_column($ret, 'filter_formats', 'weight', array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'));
   return $ret;
 }
 
Index: modules/locale/locale.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.install,v
retrieving revision 1.30
diff -u -r1.30 locale.install
--- modules/locale/locale.install	14 Apr 2008 17:48:37 -0000	1.30
+++ modules/locale/locale.install	1 Jul 2008 05:07:11 -0000
@@ -6,7 +6,7 @@
  */
 function locale_install() {
   // locales_source.source and locales_target.target are not used as binary
-  // fields; non-MySQL database servers need to ensure the field type is text
+  // columns; non-MySQL database servers need to ensure the column type is text
   // and that LIKE produces a case-sensitive comparison.
 
   // Create tables.
@@ -27,7 +27,7 @@
   $ret = array();
 
   $schema['languages'] = array(
-    'fields' => array(
+    'columns' => array(
       'language' => array(
         'type' => 'varchar',
         'length' => 12,
@@ -123,7 +123,7 @@
 function locale_update_6001() {
   $ret = array();
   $ret[] = update_sql('UPDATE {locales_target} SET language = locale');
-  db_drop_field($ret, 'locales_target', 'locale');
+  db_drop_column($ret, 'locales_target', 'locale');
   return $ret;
 }
 
@@ -227,7 +227,7 @@
 function locale_schema() {
   $schema['languages'] = array(
     'description' => t('List of all available languages in the system.'),
-    'fields' => array(
+    'columns' => array(
       'language' => array(
         'type' => 'varchar',
         'length' => 12,
@@ -310,7 +310,7 @@
 
   $schema['locales_source'] = array(
     'description' => t('List of English source strings.'),
-    'fields' => array(
+    'columns' => array(
       'lid' => array(
         'type' => 'serial',
         'not null' => TRUE,
@@ -352,7 +352,7 @@
 
   $schema['locales_target'] = array(
     'description' => t('Stores translated versions of strings.'),
-    'fields' => array(
+    'columns' => array(
       'lid' => array(
         'type' => 'int',
         'not null' => TRUE,
Index: modules/contact/contact.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.install,v
retrieving revision 1.10
diff -u -r1.10 contact.install
--- modules/contact/contact.install	18 Dec 2007 12:59:21 -0000	1.10
+++ modules/contact/contact.install	1 Jul 2008 05:07:07 -0000
@@ -27,7 +27,7 @@
 function contact_schema() {
   $schema['contact'] = array(
     'description' => t('Contact form category settings.'),
-    'fields' => array(
+    'columns' => array(
       'cid' => array(
         'type' => 'serial',
         'unsigned' => TRUE,
Index: update.php
===================================================================
RCS file: /cvs/drupal/drupal/update.php,v
retrieving revision 1.254
diff -u -r1.254 update.php
--- update.php	14 Apr 2008 17:48:33 -0000	1.254
+++ update.php	1 Jul 2008 05:06:43 -0000
@@ -410,7 +410,7 @@
   }
 
   $schema['batch'] = array(
-    'fields' => array(
+    'columns' => 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),
@@ -491,25 +491,25 @@
 
   if (drupal_get_installed_schema_version('system') < 6000 && !variable_get('update_d6_requirements', FALSE)) {
     $spec = array('type' => 'int', 'size' => 'small', 'default' => 0, 'not null' => TRUE);
-    db_add_field($ret, 'cache', 'serialized', $spec);
-    db_add_field($ret, 'cache_filter', 'serialized', $spec);
-    db_add_field($ret, 'cache_page', 'serialized', $spec);
-    db_add_field($ret, 'cache_menu', 'serialized', $spec);
+    db_add_column($ret, 'cache', 'serialized', $spec);
+    db_add_column($ret, 'cache_filter', 'serialized', $spec);
+    db_add_column($ret, 'cache_page', 'serialized', $spec);
+    db_add_column($ret, 'cache_menu', 'serialized', $spec);
 
-    db_add_field($ret, 'system', 'info', array('type' => 'text'));
-    db_add_field($ret, 'system', 'owner', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
+    db_add_column($ret, 'system', 'info', array('type' => 'text'));
+    db_add_column($ret, 'system', 'owner', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
     if (db_table_exists('locales_target')) {
-      db_add_field($ret, 'locales_target', 'language', array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''));
+      db_add_column($ret, 'locales_target', 'language', array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''));
     }
     if (db_table_exists('locales_source')) {
-      db_add_field($ret, 'locales_source', 'textgroup', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => 'default'));
-      db_add_field($ret, 'locales_source', 'version', array('type' => 'varchar', 'length' => 20, 'not null' => TRUE, 'default' => 'none'));
+      db_add_column($ret, 'locales_source', 'textgroup', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => 'default'));
+      db_add_column($ret, 'locales_source', 'version', array('type' => 'varchar', 'length' => 20, 'not null' => TRUE, 'default' => 'none'));
     }
     variable_set('update_d6_requirements', TRUE);
 
     // Create the cache_block table. See system_update_6027() for more details.
     $schema['cache_block'] = array(
-      'fields' => array(
+      'columns' => 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),
Index: modules/search/search.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.install,v
retrieving revision 1.15
diff -u -r1.15 search.install
--- modules/search/search.install	15 Mar 2008 12:31:29 -0000	1.15
+++ modules/search/search.install	1 Jul 2008 05:07:21 -0000
@@ -27,7 +27,7 @@
 function search_schema() {
   $schema['search_dataset'] = array(
     'description' => t('Stores items that will be searched.'),
-    'fields' => array(
+    'columns' => array(
       'sid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
@@ -62,7 +62,7 @@
 
   $schema['search_index'] = array(
     'description' => t('Stores the search index, associating words, items and scores.'),
-    'fields' => array(
+    'columns' => array(
       'word' => array(
         'type' => 'varchar',
         'length' => 50,
@@ -100,7 +100,7 @@
 
   $schema['search_total'] = array(
     'description' => t('Stores search totals for words.'),
-    'fields' => array(
+    'columns' => array(
       'word' => array(
         'description' => t('Primary Key: Unique word in the search index.'),
         'type' => 'varchar',
@@ -119,7 +119,7 @@
 
   $schema['search_node_links'] = array(
     'description' => t('Stores items (like nodes) that link to other nodes, used to improve search scores for nodes that are frequently linked to.'),
-    'fields' => array(
+    'columns' => array(
       'sid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
Index: modules/block/block.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.install,v
retrieving revision 1.11
diff -u -r1.11 block.install
--- modules/block/block.install	15 May 2008 21:30:02 -0000	1.11
+++ modules/block/block.install	1 Jul 2008 05:07:01 -0000
@@ -7,7 +7,7 @@
 function block_schema() {
   $schema['blocks'] = array(
     'description' => t('Stores block settings, such as region and visibility settings.'),
-    'fields' => array(
+    'columns' => array(
       'bid' => array(
         'type' => 'serial',
         'not null' => TRUE,
@@ -100,7 +100,7 @@
 
   $schema['blocks_roles'] = array(
     'description' => t('Sets up access permissions for blocks based on user roles'),
-    'fields' => array(
+    'columns' => array(
       'module' => array(
         'type' => 'varchar',
         'length' => 64,
@@ -128,7 +128,7 @@
 
   $schema['boxes'] = array(
     'description' => t('Stores contents of custom-made blocks.'),
-    'fields' => array(
+    'columns' => array(
       'bid' => array(
         'type' => 'serial',
         'unsigned' => TRUE,
