Note to Developers Regarding Database Changes

sunsetsystems wrote on Sunday, October 10, 2010:

Whenever you change the database schema, we have a new requirement.  Please increment the value of $v_database in version.php, so that we can know automatically when a database upgrade is required.

Also note that the version number variables have been moved from interface/globals.php to version.php.

Thanks!

Rod
www.sunsetsystems.com

tmccormi wrote on Monday, October 11, 2010:

I’ve posted this note in the wiki developer guidelines.

http://www.openmedsoftware.org/wiki/Development_Policies#Database_Table_Changes

-Tony

acmoore wrote on Monday, October 11, 2010:

Thanks for working to clarify this, guys.

Do these database upgrades get run automatically at install time? I don’t see anything that compares the version of the database and the version of the application to see if an upgrade is needed. Or, is this designed to be run manually?

Sorry for the elementary questions. I just don’t want to goof up something this important if I contribute to it!

Thanks!
-Andy

sunsetsystems wrote on Monday, October 11, 2010:

Hi Andy, currently only the new script admin.php does this comparison.  Probably we also want it at login time, and I’ll do that when I get time if nobody beats me to it.  There is no automatic database upgrading.

Rod
www.sunsetsystems.com

acmoore wrote on Monday, October 11, 2010:

Thanks. I added a note on the wiki. (Primarily to remind myself in case I ever need it)
-Andy

bradymiller wrote on Thursday, October 14, 2010:

hey,
This is currently broken (version.php settings are not imported on installation) after migrating setup.php to the installer class. Fix looks easy; will likely fix/commit it within the next day or so.
-brady

bradymiller wrote on Thursday, October 14, 2010:

hey,
Just committed fix for above issue.
-brady

blankev wrote on Thursday, October 14, 2010:

Brady,

If version x.y is included in XL( ) any Developer who wants to implement his OEMR installation could translate it into something more meaningful for his personal efforts. English => English can help the English installers. All other can translate into their own favorites through translation tables or personal translations.

I agree with Brady it is something easy to implement changing 3.2 into 4.0 but someone has to do it.

Pimm