Magento rename table

0

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!

About Author

Là một developer rất ham chơi nhưng không ham hố, không ham chơi nhưng rất thích cầm đầu...

Leave a Reply