Magento rename table

magento

Magento rename table

Rename database tables could make manually through a tool like phpMyAdmin or softwares, but because a default Magento install counts over 200 tables.

Magento rename table

 

This issue is better performed by using a PHP-script.
Add the below code to a PHP file

//create table
$installer = $this;
$installer->startSetup();
$installer->getConnection()->renameTable(‘old_table’, ‘new_table’);

$installer->endSetup();

 

Thanks for watching!