Glitch in upgrading database from 5.0.0 to 5.0.2 in Linux

installation

(Ronald Leemhuis) #1

I have used OpenEMR version 5.0.0 on Ubuntu 16.04 server successfully and have accumulated much practice data in a MySQL database. I am in the process of trying to upgrade to version 5.0.2. To do so, I have set up Ubuntu 18.04 LTS server and have put in all the dependencies. I have changed the default sql_mode to ‘’ and have confirmed that. I can set up a raw installation in version 5.0.2, and it seems to work fine. Patient demographics display is good. I then source the old version 5.0.0 database dump into the other setup. I subsequently source the 5_0_0-to-5_0_1_upgrade.sql script and next the 5_0_1-to-5_0_2_upgrade.sql script. I do not see any errors other than occasional “table already exists,” for example. My problem is that something appears to be wrong with the demographics display with the converted data. The patient_data table seems OK – there is something wrong with the layout. I suspect that there there may be something wrong in the conversion or creation of tables called layout_options and/or layout_group_properties. Maybe it is something else. Does anybody have a suggestion?


(Stephen Waite) #2

hi @rleemhuis, drop the database, create a new database and import a backup of your 5.0.0 before you run the upgrade and it’s fine to jump from 5.0.0 to 5.0.2 in one step.


(Ronald Leemhuis) #3

I have been manually sourcing the incremental upgrade scripts and not using the built-in script caller. I do understand what you suggest. I will give it a try, but I suspect something is wrong with the 5.0.0 to 5.0.1 script.


(Ronald Leemhuis) #4

I followed your advice, and my upgrade from 5.0.0 to 5.0.2 now works properly. My error was that I failed to create an empty openemr database. I was using a database with the table structure from a new version 5.0.2 installation. I assumed that my database restoration would wipe out all the pre-existing tables. That was an unwarranted assumption. Some tables were left behind. Their presence prevented the conversion from doing all the necessary operations.