Broken upgrade script

bradymiller wrote on Monday, April 25, 2011:

hey,
If run the sql upgrade script twice (this is how to ensure the script does not break when upgrade has already been complete), get the following errors:
ALTER TABLE `openemr_postcalendar_categories` ADD `pc_cattype` INT( 11 ) NOT NULL COMMENT ‘Used in grouping categories’
ERROR: query failed: ALTER TABLE `openemr_postcalendar_categories` ADD `pc_cattype` INT( 11 ) NOT NULL COMMENT ‘Used in grouping categories’
Error: Duplicate column name ‘pc_cattype’

zhhealthcare,
I’m pretty sure this is related to your recent facility calendar code. please fix (would like to avoid having this script broken for too long).

-brady

zhhealthcare wrote on Monday, April 25, 2011:

Error: Duplicate column name ‘pc_cattype’ is resolved.

Updated in git to the branch
(calendar_comments) accessible at
https://github.com/zhhealthcare/openemr/commits/calendar_comments

The patch file is also uploaded at
https://sourceforge.net/tracker/?func=detail&atid=1245239&aid=3086688&group_id=60081
with name ‘0001-If-run-the-sql-upgrade-script-twice-Error.patch’

Thanks
Paul

bradymiller wrote on Monday, April 25, 2011:

wow,
That was super quick. I just committed your fix to sourceforge.
thanks,
-brady