Application Name: OpenMRS Platform Version Number: Most Recent (Cloned from git today)
Question: When I go through the manual setup process on mac os x 10.10.5 (Yosemite) I get the following sql error on the database update step:
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::200902142213::ewolodzko: Reason: liquibase.exception.DatabaseException: Error executing SQL UPDATE person_attribute_type as A JOIN person_attribute_type as B ON A.name = B.name SET A.sort_weight = (select count() from (select * from person_attribute_type) pat where pat.name < A.name) WHERE A.sort_weight is null: You can’t specify target table ‘A’ for update in FROM clause: Caused By: Error executing SQL UPDATE person_attribute_type as A JOIN person_attribute_type as B ON A.name = B.name SET A.sort_weight = (select count() from (select * from person_attribute_type) pat where pat.name < A.name) WHERE A.sort_weight is null: You can’t specify target table ‘A’ for update in FROM clause: Caused By: You can’t specify target table ‘A’ for update in FROM clause Error while trying to update to the latest database version
I’ve tracked down an old error similar to this: “https://wiki.openmrs.org/questions/79665185/sql-error-in-manual-installation” and “https://wiki.openmrs.org/display/docs/Installation+for+Developers+on+Mac+OS” (comment at bottom). After trying the suggested solutions in those, as well as some linked Stackoverflow posts, I still can’t get openmrs up and running.
I’m new to openmrs and sql, so this may be any easy fix. But if someone could explain to me how to fix this error, it would be greatly appreciated. Thanks for taking the time to help a new dev!