method

rename_table

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v4.1.8) is shown here.

rename_table(table_name, new_name)
public

Renames a table. Also renames a table’s primary key sequence if the sequence name matches the Active Record default.

Example:

rename_table('octopuses', 'octopi')