0

I have created a extension with version 0.0.1 and it is listed on magento connect.

My question is I have to make some changes in the extension block files. After completing My Changes, I have change version number in config xml from 0.0.1 to 0.1.0

there is no change in set up script, in first released it was named as install-0.0.1.php. do I need to rename this files as well to install-0.1.0.php.

Please suggest what are the correct steps to create Version Upgrade for extension.

Thanks

5

You don't need to rename the install. It will run install-0.0.1.
When installing a module Magento will run the install file with a version lower or equal to the module version. If there are 2 install scripts it will run the one closest to the version declared in config.xml.

  • To be clear: you define the "current version" of your module in the XML. When installing/updating each module, Magento will always run all install scripts named with a version number lower or equal to the "current version". So in the future when you'll add new "update" scripts to your module you'll create a new file alongside the initial install file. – Mihai Stancu Aug 27 '13 at 13:47
  • @MihaiStancu. I'm not sure it will run ALL the install scripts with a version lower than the "current version". I'm 99% sure it runs only one install script and all the upgrade scripts between the install and current version. For example take Mage_Catalog (latest version 1.6.0.0.14). If you install Magento 1.7 it won't run mysql4-install-0.7.0.php, just install-1.6.0.0 and every upgrade script starting with upgrade-1.6.0.0.1-.... – Marius Aug 27 '13 at 13:58
  • 1
    Well there's only one install script and several upgrade scripts. If the module has never been installed on the current deployment there will be no entry for it in the core_resouce table so the install script will be run and the every upgrade script up to the current version. – Mihai Stancu Aug 27 '13 at 14:42
  • 1
    On the other hand if the module had already been installed, there would a an entry in core_resource with a version number and all upgrade scripts with a version higher than the core_resource.version but lower or equal to the current version will be run. – Mihai Stancu Aug 27 '13 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.