Try the Demo

Magento

eCommerce Software for Online Growth

Magento Forum

Our new hosted solution for small & emerging businesses
   
Magento not running the mysql4-install-0.1.0.php for my module
 
MA_19
Member
 
Total Posts:  41
Joined:  2009-01-21
 

Hi there,

I was testing out some ideas using a module I’d created using the module creator, when I decided to add some new database tables to the mysql4-install-0.1.0.php file for my module.

Everything I found on the net said that Magento would create the new tables next time the module ran, but this didn’t seem to be happening.
I tried a lot of things, but in the end I found that the first time Magento reads a module’s etc/config.xml it writes the value of <version> into the core_config table in the database.

Magento will not then run the mysql4-install-0.1.0.php file again whilst the version number in core_config matches the one in the config.xml

I removed the entry for my module in core_config. Magento then ran the mysql4-install-0.1.0.php and created my new tables smile

That one took me a while to figure out - so I thought I’d share.

Matt

 
Magento Community Magento Community
Magento Community
Magento Community
 
Magrim
Jr. Member
 
Total Posts:  1
Joined:  2009-03-23
 

Thank you for saving my time smile , though in my case the table was “core_resource” (Magento ver. 1.2.1.2).

 
Magento Community Magento Community
Magento Community
Magento Community
 
Manos Dilaverakis
Member
 
Total Posts:  49
Joined:  2009-02-25
 

Incidentally this is why you should be careful what you name your module, or to be more specific how you set up your config.xml to enter you module into the database. If you end up with the same name as a core (or other existing) module your mysql4-install-0.1.0.php will never run.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2012 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
713669 users|868 users currently online|495363 forum posts