You are here

function db_rename_table in Drupal 6

Same name in this branch
  1. 6 includes/database.mysql-common.inc \db_rename_table()
  2. 6 includes/database.pgsql.inc \db_rename_table()
Same name and namespace in other branches
  1. 8 core/includes/database.inc \db_rename_table()
  2. 7 includes/database/database.inc \db_rename_table()

Rename a table.

Parameters

$ret: Array to which query results will be added.

$table: The table to be renamed.

$new_name: The new name for the table.

Related topics

2 calls to db_rename_table()
system_update_6022 in modules/system/system.install
Update files tables to associate files to a uid by default instead of a nid. Rename file_revisions to upload since it should only be used by the upload module used by upload to link files to nodes.
system_update_6030 in modules/system/system.install
Add the tables required by actions.inc.

File

includes/database.mysql-common.inc, line 257
Functions shared between mysql and mysqli database engines.

Code

function db_rename_table(&$ret, $table, $new_name) {
  $ret[] = update_sql('ALTER TABLE {' . $table . '} RENAME TO {' . $new_name . '}');
}