diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/database.mysql-common.inc | 16 | ||||
-rw-r--r-- | includes/database.pgsql.inc | 36 |
2 files changed, 0 insertions, 52 deletions
diff --git a/includes/database.mysql-common.inc b/includes/database.mysql-common.inc index 937a8e16b..f56c32143 100644 --- a/includes/database.mysql-common.inc +++ b/includes/database.mysql-common.inc @@ -453,22 +453,6 @@ function db_change_field(&$ret, $table, $field, $field_new, $spec) { } /** - * Update a field definition to match its schema. If the field is - * involved in any keys or indexes, recreate them. - * - * @param $ret - * Array to which query results will be added. - * @param $table - * Name of the table. - * @param $field - * Name of the field to update. - */ -function db_update_field(&$ret, $table, $field) { - $spec = drupal_get_schema($table); - db_change_field($ret, $table, $field, $field, $spec['fields'][$field]); -} - -/** * Returns the last insert id. * * @param $table diff --git a/includes/database.pgsql.inc b/includes/database.pgsql.inc index 4e4d9bbe5..5778aac10 100644 --- a/includes/database.pgsql.inc +++ b/includes/database.pgsql.inc @@ -864,42 +864,6 @@ function db_change_field(&$ret, $table, $field, $field_new, $spec) { } /** - * Update a field definition to match its schema. If the field is - * involved in any keys or indexes, recreate them if necessary. - * - * @param $ret - * Array to which query results will be added. - * @param $table - * Name of the table. - * @param $field - * Name of the field to update. - */ -function db_update_field(&$ret, $table, $field) { - $spec = drupal_get_schema($table); - - db_change_field($ret, $table, $field, $field, $spec['fields'][$field]); - if (isset($spec['primary key'])) { - if (array_search($field, db_field_names($spec['primary key'])) !== FALSE) { - db_add_primary_key($ret, $table, $spec['primary key']); - } - } - if (isset($spec['unique keys'])) { - foreach ($spec['unique keys'] as $name => $fields) { - if (array_search($field, db_field_names($fields)) !== FALSE) { - db_add_unique_key($ret, $table, $fields); - } - } - } - if (isset($spec['indexes'])) { - foreach ($spec['indexes'] as $name => $fields) { - if (array_search($field, db_field_names($fields)) !== FALSE) { - db_add_index($ret, $table, $fields); - } - } - } -} - -/** * @} End of "ingroup schemaapi". */ |