Darius,
That query shows many users whose user_id does not match a person_id. I
will reinstall the affected users and run the upgrade again. Thanks for
the assistance.
Regards,
Rob
On 9/28/2011 9:12 AM, Rob Borland wrote:
Thanks for the good advice Darius. I will report my results.
Regards,
Rob
On 9/27/2011 7:25 PM, Darius Jazayeri wrote:
Can you try something like "select user_id from user where user_id not
it (select person_id from person)" and see what that looks like? It
shouldn't have been possible for you to have users whose user_id was not
equals to the person_id of a person before 1.6, even though there was no
db constraint for this.
-Darius
On Tue, Sep 27, 2011 at 10:02 AM, Rob Borland <[email protected]
<mailto:[email protected]>> wrote:
Upgrading OpenMRS 1.4.6 to 1.6.3 fails with this error:
OpenMRS Installation Wizard
* There was an error while updating the database to the latest.
file: liquibase-update-to-latest.__xml. Error: Migration failed for
change set
liquibase-update-to-latest.__xml::200912031846-3::__djazayeri:
Reason: liquibase.exception.__JDBCException: Error executing SQL
ALTER TABLE `users` ADD CONSTRAINT `person_id_for_user` FOREIGN KEY
(`person_id`) REFERENCES `person`(`person_id`): Caused By: Error
executing SQL ALTER TABLE `users` ADD CONSTRAINT
`person_id_for_user` FOREIGN KEY (`person_id`) REFERENCES
`person`(`person_id`): Caused By: Cannot add or update a child row:
a foreign key constraint fails (`openmrs`.`#sql-3ed_59`, CONSTRAINT
`person_id_for_user` FOREIGN KEY (`person_id`) REFERENCES `person`
(`person_id`)) Error while trying to update to the latest database
version
I can force the change by disabling foreign key checks but I get the
same error when I reopen the web app.
I'd appreciate any advice.
Regards,
Rob
___________________________________________
To unsubscribe from OpenMRS Implementers' mailing list, send an
e-mail to [email protected]
<mailto:[email protected]> with "SIGNOFF
openmrs-implement-l" in the body (not the subject) of your e-mail.
[mailto:LISTSERV@LISTSERV.__IUPUI.EDU
<mailto:[email protected]>?body=SIGNOFF%__20openmrs-implement-l]
------------------------------------------------------------------------
Click here to unsubscribe
<mailto:[email protected]?body=SIGNOFF%20openmrs-implement-l>
from OpenMRS Implementers' mailing list
_________________________________________
To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to
[email protected] with "SIGNOFF openmrs-implement-l" in the body
(not the subject) of your e-mail.
[mailto:[email protected]?body=SIGNOFF%20openmrs-implement-l]