Upgrading from 4.1.0 to 5.0.0

I am looking to upgrade from our current version 4.1.0 (which we have modified quite a bit to fit our practice and workflow) to version 5.0.0 and the first step I was looking at was “Dual Upgrade of OpenEMR and XAMPP in Windows” which has a step to perform a mysqldump of the existing db. When I did the mysqldump and reviewed the dumpfile.sql file that was created, it has DROP TABLE commands to delete the table if it exists. This in my mind would delete the 5.0.0 version of the table then recreate the 4.1.0 version of the table in its place. How can this be the correct action if a change was made in the 5.0.0 version requiring an additional field or a change in field type? I am not saying there was but it really sounds like this dumpfile would downgrade the database.

Thoughts?

hi @kul2bme, the first step is the creation of a backup just in case you need it should something go wrong in the upgrade process. inside the dumpfile.sql is all of the data needed for mysql to recreate the database at that point in time :slight_smile: so it’s natural to drop a table just before you recreate and insert the data in this case

Thanks, @stephenwaite. But again, if the 5.0.0 version table were to have additional fields that are required by the software then dropping a table and recreating it with only the fields that the 4.1.0 version needs would not work. I would get an error in the software.

Now, I am not saying this is going to happen or is even the case. However, in trying to cover all contingencies, the Drop/Create table commands stood out as a BIG red flag to me. I did not see any posts that anyone had an issue with this but I am making a big version jump here. So, I thought I would ask before I got too far down this road. I can compare the schema of the tables in 5.0.0 to the schema of the tables in 4.1.0 prior to importing the sqldump to see what if any ramifications there would be to allowing the Drop/Create Table commands to execute.

@kul2bme if you look in the dump.sql you should see your customizations (if any to the database were made) because you are making a backup of 4.1.0

so this is only to be used to restore 4.1.0 if you need to backup and try the upgrade again

if you’ve made modifications/customizations to the structure of the tables then this will have to be addressed at some point, probably easiest after you upgrade and then run a custom sql command to bring those in

Hi @kul2bme ,
Do note that the upgrade of the database happens with the sql_upgrade.php script run. So, if you wish to migrate 4.1.0 to 5.0.0, you would need to run that script. And if you ever migrate/restore your database, you definitely don’t want to migrate it into a non-empty database (this is why there is the drop command by mysql to ensure this).
-brady

@brady.miller , thank you as I had totally missed that step in the instruction to run that script. Once I did then everything worked out all right. I am additionally upgrading our hardware to new servers and had sidelined this until I could get things accomplished on that front. The only thing now is in the TAB format everything on the tab is compacted to the left of the window. On the FRAME format it all looks as it should. I figure there is a setting somewhere that i need to change to make it look right.
Anyway, thank you and @stephenwaite for your assistance.

-Jason aka kul2bme

Just an FYI the last TAB comment was on IE11. When I tried it on Chrome, it looks just fine. So, stupid IE!!!

hi @kul2bme ,

Great to hear things worked out. Best to avoid IE, if possible, although haven’t heard of major issues with Edge. There have been several bug fixes I think in the development codebase(I think they were added to the most recent 5.0.0 patch); you could also point your browser to the most recent development codebases to see if there are still issues.
Here’s the demo with most recent 5.0.0 codebase (ie. with most recent patch):
http://www.open-emr.org/wiki/index.php/Development_5.0.0_Demo
And here’s the demo(s) with most recent development codebase (ie. will be 5.0.1 when released):
http://www.open-emr.org/wiki/index.php/Development_Demo#Daily_Build_Development_Demos

-brady

Hi Brady Miller,

This is nagendra,We plan to update OpenEMR 412 to 501,Which server is is better to upgrade i.e ubuntu or linux and also dont know upgrading process can pls give few instructions about open EMR upgrade

Regards,
Nagendra.J

hi @Vasudeva,
What OS are you using now with OpenEMR 412?
-brady

Hi Brady Miller,

Current we are using CentOS server for 412 openemr,But we plan to upgrade from 412 to 501 we confused on that which server is better for upgradation because of we are added extra more third party futures for 412.

1.I was tried upgradation using ubuntu based but am getting issues Please guide how to upgrade using ubuntu or linux what ever it is

2.Please if you dont mind can provide upgradation process

@Brady is there any possibility please tell me your available time we connect once

Regards,

Nagendra.J

I am trying to go from V3.2.0 to V5.0.0 in one step and this doesn’t seem to work so well.

Can I skip any of the point releases or do I have to go each step and avoid skipping any of the intermediate steps?