db_rename_table

Definition

db_rename_table(&$ret, $table, $new_name)
drupal/includes/database/database.inc, line 2005

Description

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

Namesort iconDescription
Schema APIA Drupal schema definition is an array structure representing one or more tables and their related keys and indexes. A schema is defined by hook_schema(), which usually lives in a modulename.install file.

Code

function db_rename_table(&$ret, $table, $new_name) {
  return Database::getActiveConnection()->schema()->renameTable($ret, $table, $new_name);
}