1 database.inc db_rename_table($table, $new_name)

Renames a table.

Parameters

string $table: The current name of the table to be renamed.

string $new_name: The new name for the table.

Related topics

File

core/includes/database/database.inc, line 3087
Core systems for the database layer.

Code

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