0

I know how to do upgrade scripts within Magento but the current way relies on me knowing the version the user is running.

If I have some users running v0.2 and some 0.3 but I want to make a change for anyone who moves onto 0.5 how I would I go about that?

I currently have:

mysql4-install-0.2.0.php 

My new version will be 0.5.0 but some users are running 0.4.6 and some are running 0.4.9.

Do I have to create an upgrade script for each of the versions users might be using? i.e

mysql4-upgrade-0.4.6-0.5.0.php mysql4-upgrade-0.4.9-0.5.0.php 

2 Answers 2

2

You only have to create the 0.4.9 - 0.5.0 script. Magento will automatically pickup the skip in version numbers.

0

You can create a few upgrade-scripts. like:

upgrade-0.2.0-0.5.0.php upgrade-0.3.0-0.5.0.php 

and put different thing in them, depending what happend in version 0.3.0

2
  • I tried doing 0.2.0 to 0.5.0 but it didn't apply. I assume this is because I wasn't running version 0.2.0 Commented Oct 18, 2013 at 13:04
  • Yes, it only applies if your version is before this. If you have Version 0.2.1 then 0.3.0 should run Commented Oct 18, 2013 at 14:00

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.