Upgrade from 4.2.2 issues unknown column 'group_id'

I am trying to upgrade from 4.2.2 to 7.0. First I install 7.0 with blank database named openemr. I used phpmyadmin and created a blank database named staging with same user credentials as openemr database. I edited default site sqlconfig file to point to staging database. Restored a 4.2.2 backup into the blank staging database. Used browser to run sql_upgrade.php and selected to upgrade from 4.2.2. Got some errors saying unknown column ‘group_id’ in in ‘field list’. Created new column named ‘group_id’ after ‘group_name’ and dropped ‘group_name’ in ‘layout_options’ table. Ran sql_upgrade and selected to upgrade from 5.0.0. The upgrade completed without me noticing any errors. I had no UUID taking long time issues even though my data is quite large. Now my issue is that the layout of some of the pages is not the same as the default pages with the default database created by 7.0. My document tab is blank(unknown). My form administration errors when trying to enable eye exam saying something about can’t open table.sql.
Now I am wondering if I can just dump only the tables that relate to patients and encounters. leaving out tables for themes and other system configurations not tied to patient records.
Can anyone let me know which tables they are? Or let me know what I am doing wrong in my upgrade? Thank you.

hi @Kanoberson, you could try again on a test system but choose upgrade from 4.2.0 or even 4.0.0 to make sure you don’t miss adding a group_id field in the database upgrade. Also could try upgrading to the recently released 7.0.2 :slight_smile:

1 Like

@stephenwaite didn’t you find an issue a while back with upgrade from 4.2 to 6? Or did you fix.

hi @sjpadgett, I do not recall finding or fixing an issue :slight_smile:

Thank you so much. I used 7.0.2 sql_upgrade.php and ran upgrade from 4.2.2. (Thank you guys for speeding up the UUID updates). Once the database upgrade completed still having ‘group_id’ errors, I then dropped the layout_options table from the populated and upgraded database. Exported layout_options table from an empty database I created using 7.0.2 and imported into my upgraded database and voila all my stress and frustrations just magically disappeared. Thank you.

1 Like