4.1.2 to 5.0.1 Upgrade Errors

Unfortunately backup of 4x install is not working. It dies before download but I do get the sql and directory tar files.
I installed 5 renamed the folder, untared the 4x directory in its place (fixing permissions), dropped the database and imported the tared sql.
Ran sql_upgrade.php
Logged in as admin. Checked a couple of patients and encounters.
So far so good.
When I try to update ICD Codes I get
SQL Error with statement:query failed: LOAD DATA LOCAL INFILE ‘/tmp/ICD10/icd10cm_order_2018.txt’ INTO TABLE icd10_dx_order_code FIELDS TERMINATED BY ', referer: http://192.168.1.211/openemr/interface/code_systems/dataloads_ajax.php

And if I check the version in about it still shows 4.1.2

But otherwise it works as 5.01(7) just fine…WIERD…

I would re-attempt the upgrade but make it go a few versions back. The other thing I suggest is try doing the upgrade first to 5.0.0, then go to 5.0.1. I’ve done a few upgrades where the script caused issues and I had to get creative. That was one of my solutions.

The other thing that you want to do is make sure you have your php settings set to the recommended settings in the install instructions. One of the issues I ran into during one upgrade was the php settings had smaller values that required and it caused the upgrade script to break (it timed out).

Just because it looks like it works fine initially, there will be tables that are missing from functions that you might not use all the time. Trust me - you do not want to lose data and try to recover. I would make sure you get it working 100% then moving forward with 501.

The other thing to keep in mind is that previous to 5.0.1 you could rerun the script and not have issues. Not with the 5.0.1 upgrade. If you try to rerun it, you will get error messages.

think it’s related to [this post] (Problem finding diagnostics code by ICD9 code ICD 10 and all others)

Check out this recent issue related to this mysql error:

Turns out the original Database is corrupt…And Surprise Surprise They have no backup.
Oh what joy :frowning_face:
Thanks guys…

I’ve dealt with data loss before and I got very intimate with an upgrade that went wrong in the past. If I understand exactly what happened, I can probably get you in a position where you can get up and running again.