Thursday, September 24, 2015

Magento - your extension's setup sql file is not being executed

This blog entry is relevant for  Magento 1.6.

If you are writing a Magento extension which needs to alter Magento database, and you don't see the db being changed after your logout / login to your admin panel, then make sure these settings are correct:

1. Your sql / [folder] needs to match [folder] inside config.xml file of your extensions

If your config is like this:


Then you should have your sql setup files in folder:
sql / cmsubtotals_setup

2. Your extension version needs to be exactly the same in both your config.xml and mysql*install.php filename:



Must be matched with this filename:


You can confirm that your setup is being initialized by checking your core_resources Magento table for entry:


No comments:

Post a Comment

Ubuntu 12.04, 14.04, 16.04 - auto start an app or script before login

To run a command or application at startup, even before the user has logged in, you can use this file: /etc/rc.local The commands entered...