Affects Version/s: None
Fix Version/s: Core 2.3.0
The convention in the OpenMRS data model is to avoid using SQL reserved words in table or column names. See https://wiki.openmrs.org/x/MA8z
Unfortunately the allergy.comment column (introduced to openmrs-core from the allergy-api module) incorrectly has a column called "comment".
We should change this column name to "comments"
- The "allergy.comment" column is renamed to "allergy.comments"
- Any existing data should be upgraded, invisibly to the end user
- The Allergy UI module should continue to work both before and after this change. (If this breaks, then create a separate ticket for any required changes.)
- The REST resource for allergies should continue to work both before and after this change, and the REST representation of allergy should remain unchanged. (If this breaks, then create a separate ticket for any required changes.)
Nice to have:
1. There is a unit test that runs when openmrs-core is built which verifies that all database tables and column names follow our conventions
The Allergy UI module's code is at https://github.com/openmrs/openmrs-module-allergyui
The REST resource is https://github.com/openmrs/openmrs-module-webservices.rest/blob/master/omod-2.0/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs2_0/PatientAllergyResource2_0.java.