I noticed after I have installed new installations of patch 6 (and 5) that when I run admin.php, it shows I need to patch the database. I think something needs to get incorporated into the install scripts.
Yes that is the admin.php that I mean, but not in that context.
Having upgraded lots of openemr systems, I run admin.php almost automatically: so when I saw a brand new openemr and database installation show “patch_database” on the admin screen, I wonder why. In my opinion, in a fresh new installation running a database patch should not be required: The patch should already be part of the database setup.
Hi Jason,
I see where you’re coming from. I’m guessing you’re taking the most recent code from the rel-410 branch and installing it. Then you need to run the sql_patch.php (or simply click on the patch link in admin.php to run the patch sql script). I purposefully stayed away from touching the database.sql file, because it simply becomes another thing I need to test when releasing a patch (need to test the patch mechanism and then additionally the install mechanism of the new patched version). The thought was that it would become too burdensome for myself. However, I am considering doing this for the rel_411 branch (ie. after the next production release) now that I’m more comfortable with the current patch work flow. This stuff is always a work in progress.
-brady
Also,
Just realized that this is something that could be incorporated into the Installer class. For example, if a sql/patch.sql file exists then run sql_patch.php rather than do the update globals/version of the normal install. Then get best of both worlds; no need to test new installs database mods separately and get the patched stuff automatically during the install. If your up for implementing this, I’d be glad to provide guidance, if needed.
-brady