Upgrading from 2.4.2 to 2.5
We released much awaited OrangeHRM 2.5 on October 6th. The urgency to release 2.5 did not give us much time to explain our plans to provide upgraders to 2.5. Since released, there has been much discussion on this and we thought to address the issue in this post.
First of all we need to say that we haven’t stopped providing automated upgraders for stable releases. We started it at version 2.4.1 and continued in version 2.4.2. We will do the same for version 2.5 but with a different approach. We didn’t release the upgrader with 2.5 basically for two reasons.
- First, creating upgraders take both development and QA effort. This could have led to further delays in releasing OrangeHRM 2.5 stable.
- Even after thorough testing, we noticed that few users had found issues in the upgraders. So, we decided to release it separately so that we can handle issues raised on upgraders separately and even provide new versions of the upgraders.
Currently we are working on 2.5 upgrader and it would take about 4 to 6 weeks to release it with QA testing. Once we finished the development, there is a chance to make an intermediate release without QA testing. However, if you are in too much of a hurry to get this done and has required technical background, below are the steps for upgrading from version 2.4.2 to 2.5.
- First list down all the database schema changes by comparing dbscript/dbscript-1.sql in both versions.
- Then check whether there are any changes in default data inserted by comparing dbscript/dbscript-2.sql.
- Write SQL queries for all changes found in step 1 and 3. That is, to convert a 2.4.2 database into a 2.5 database.
- Install 2.5 in a new location of your web server.
- Get a database dump of your current installation of version 2.4.2.
- Replace the 2.5 database using the dump of version 2.4.2.
- Run all the SQL queries prepared in step 3 on replaced 2.5 database.
- Check hs_hr_time_event and see whether there are more than one rows for same day, same project, same activity. If so, get the total duration of all rows and delete them. Then insert a new row with this duration. This is needed since in version 2.5, time entry has been simplified.
Above are the main steps to upgrade from version 2.4.2 to 2.5. If you try this out, make sure you don’t make any change to your existing 2.4.2 installation. That would let you continue in version 2.4.2 even if you get an error in upgrading.
Upgrading with OrangeHRM Support
If you are an OrangeHRM Support subscriber and if you made a request to upgrade from your existing version to 2.5, one of our support engineers will examine your current version (can be 2.4.2 or an earlier version) and database and make necessary changes. These requests are handled case by case but automated upgrader needs to handle all possible scenarios. That’s why it takes time.
So, for upgrading from version 2.4.2 to 2.5, you have following options.
- If you are in a hurry and has the required technical skills, you can follow the steps described above and do the upgrade.
- If you are in a hurry but hasn’t got the technical skills, you can consider doing the upgrade via OrangeHRM Support.
- If you can be bit patient, continue with 2.4.2 and upgrade when 2.5 automated upgrader is released.
Stay in touch with our blog for updates about the upgrader.




November 5th, 2009 at 8:42 pm
Upgrader works fine except in the cases where mysql is running on non-standard port.
In such cases, you need to modify code in two places:-
Upgrader242To25.php
Authorize.php
Just modify mysql_connect() code, pass server address in this format server:port.
November 5th, 2009 at 8:44 pm
Another issue I noticed, Upgrader was unable to find the Conf.php which is inside lib/conf directory of 2.4.2 installation.
I moved the Conf.php inside newversion/upgrade directory and modified Authorize.php’s require_once statement to correct the path.
November 9th, 2009 at 6:44 am
Hi Abdul,
Thanks for your input on mysql_connect(). This will be addressed in next upgrader release.
I am not sure about “Upgrader was unable to find the Conf.php” since this was not caught by anyone else or in our basic testing. However we will look into this too.
FYI:
It would be helpful if you add comments to the upgrader announcement post.
http://www.orangehrm.com/blog/2009/10/29/orangehrm-25-upgrader-alpha1-released/
November 12th, 2009 at 7:05 pm
Hi Gayanath
Thanks for prompt resonse.
JFYI! I have not been able to upgrade yet. Upgrade is stuck at importing the data into new database.
I waited for hours and nothing happens.
Now I have started having lower faith in organgehrm initiative. I approve the approach, where you release the software under opensource and charge no money for using it, but charge for service and support.
Now this kind of upgrade process and tools (upgrader), I doubt many companies would want to use orangehrm, since not everyone is tech-savvy enough to fix things manually, hence thats where OrgangeHRM’s business model kicks in?
I find it little weird, where OrangeHRM is putting untested upgrader and not really supporting automatic upgrade? By this approach, they would not really gain anything, I could have been potential customer in coming years, but now I am actually searching for better options - where i don’t have to worry that upgrade to next version would be so complex (from an end users perspective).
Thanks for building orangehrm, it’s really sweet stuff. I hope, you start providing better scripts that work and really don’t force people to buy your services?
Thanks
-abdul
November 13th, 2009 at 12:15 pm
Hi Abdul,
I am sorry about your frustration with the alpha.1 release of the upgrader. As mentioned in Upgrading from 2.4.2 to 2.5, It could have been about 6 weeks to release the upgrader with QA testing. That’s why we made an alpha release with basic developer testing so that community can test it and give us better feedback. In announcement post and in the login page of the upgrader it’s clearly mentioned that this is an alpha release without QA testing. Since released, we have heard about successful upgrades as well as unsuccessful upgrades. Our plan is to address the reported issues and make another release probably next week.
We don’t usually recommend alpha or beta releases to use in production environments. But we changed that decision for this upgrader since it would be good to release the upgrader soon without waiting so long and hoping community would help us on improving it. It’s sad to see that you consider this upgrader as a bait for OrangeHRM Professional Support. If you notice thoroughly, you can find out that there is no mention about support services in upgrade instructions or upgrader itself. And also as explained above the mere expectation of this alpha release is to provide something to the community soon and improve it based on their feedback. There is no hidden agenda to use it as bait for support subscriptions.
November 17th, 2009 at 11:28 am
Hi Abdul,
Please try out alpha.2 version. It contain fixes for two issues you faced.
http://www.orangehrm.com/blog/2009/11/17/orangehrm-25-upgrader-alpha2-released/
November 19th, 2009 at 2:43 am
I’ve tried the alpha 2 release but it reports a duplicate entry in hs_hr_time_event. I’ve checked the table and can’t find any. It goes through the upgrade but reports a failure on Data Adjustments and Old Database Constraints.
In the log file it reports Reason: Duplicate entry ‘15-16′ for key 1.
I guess this is a bug?
Thanks
Richard
November 19th, 2009 at 8:40 am
Hi Richrad,
This has been identified as a bug in alpha.2 and will be fixed in alpha.3, probably by next week.
Below is the reported bug,
http://sourceforge.net/tracker/?func=detail&aid=2899689&group_id=156477&atid=799942
November 20th, 2009 at 2:16 am
Hi Richrad,
alpha.3 version of the upgrader was released with a fix to this issue.
http://www.orangehrm.com/blog/2009/11/20/orangehrm-25-upgrader-alpha3-released/