I downloaded the latest CVS today for OpenEMR v3.3.0-dev to begin testing with our data. Currently we are using OpenEMR 3.0.1. I ran into a minor issue when running 3_0_1-to-3_1_0_upgrade.sql script. I received the following error.
MySQL said: Documentation #1062 - Duplicate entry ‘drug_interval-10’ for key 1 **
Our database currently has the values option_id = 10 and option_id = 11 in table list_options. If I delete the records where option_id = 10 and option_id = 11 , then the file 3_0_1-to-3_1_0_upgrade.sql completes without errors. The remaining upgrade SQL scripts worked fine after that.
I tried upgrading this past weekend from 2.8.4-dev and had other similar problems. Going to 3.0 was pretty easy I think. There was one empty table I had to delete for the first script to work, but no big deal. Somewhere around the scripts that upgrade past 3.0, I had various problems. Sometimes a script would lock up and sometimes would run without any problem. I had problems logging in after upgrading. This was due to changes in auth.inc. I copied in an old auth.inc and was able to get in.
Maybe some of the stuff in these scripts is too dependent on the data being just right.
mike-h30,
I am guessing that you are using the sql_upgrade.php script from the 3.0.1 version (the IfNotRow2D function does not exist in that script, so you will attempt to run this code no matter what). If you used the script that you downloaded with the version your uploading to, then should work. Let us know how it goes. Here are some uplaod guides: http://www.openmedsoftware.org/wiki/OpenEMR_Upgrade_Guides
Mark,
Going from sub-3.0 to 3.0 has some special issues.
Depends on following issues:
1) is your admin user name ‘admin’?
2) Is php-gacl installed?
3 is sql-ledger installed?
For a good example of a complete upgrade when php-gacl and sql-ledger are installed, check out how the appliance was upgraded: http://bradymd.com/appliance/update3/
I do not use the sql_upgrade.php when upgrading. Instead, I download the newest version (3.3.0) and perform a clean install in my web root. Then I drop the new openemr database and import my production database (3.0.1). Then I run each of the SQL scripts accordingly - in my case I did:
hey,
That’s incorrect. You need to use the sql_upgrade.php script. This script will automatically load all required upgrade scripts, and there utilizes functions to skip sql code that is not needed (ie. the ‘IfNotRow2D list_options list_id drug_interval option_id 10’ would cause it to skip the contained mysql code in your case). Also, note in 3.1.0 we changed to a pure UTF-8 database (previous to this was a latin1/utf8 database), so ensure you haven’t forced your hybrid database into a utf8 database incorrectly (http://www.openmedsoftware.org/wiki/OpenEMR_UTF-8_Upgrade_Howto). If you follow the posted upgrading instructions (http://www.openmedsoftware.org/wiki/OpenEMR_Upgrade_Guides), you can avoid all these issues.
-brady
I have re-visited this with CVS files from 7/18/10. This time I ran the sql_upgrade.php script per your recommendation. Upon running the sql_upgrade.php script in a web browser, I now get this error message.
What is the syntax to do what Vosolve proposes below? Am I modifying globals.php or sql_upgrade.php? I am going to try testing the upgrade from 3.0.1 to the latest CVS this weekend. Thanks.
-Mike
**
To handle this issue, we can set Audit global variable as disable in the
sql_upgrade.php file under the upgradeFromSqlFile().
Based on our analysis, this doesn’t have any influence since the audit
variable in the globals.php becomes active. We did some high-level test
this too.**