[Referential integrity constraints missing]Validate the Backup, Restore mechanisms in Bahmni

Description

  1. Having seen the Constraints missing in OpenMRS database, we need to validate that our Back up and restore mechanisms are getting the database schema along with Constraints.

  1. Angshu : if you see there are constraints defined in “bed_location_map” and not on “obs” - take a dump like we do during backup - and on a different machine restore that (like we do in restore)

Default openmrs database dump which has integrity constraint issues ->
https://github.com/Bahmni/emr-functional-tests/blob/master/dbdump/openmrs_backup.sql.gz
Base/Clean openmrs database dump which has all constraints ->
https://github.com/Bahmni/bahmni-package/blob/master/openmrs/resources/openmrs_clean_dump.sql

Activity

Show:
Rajashri Pritam Khobragade
April 8, 2019, 10:27 AM

This PR is merged in master and cherry-picked in 0.92

Angshuman Sarkar
July 25, 2019, 1:35 PM

in course of merge of openmrs and bahmni-emr rpms, the task for copying the default db from emr-functional-test/dbdump/openmrs_backup.sql.gz file was missed. This resulted the older openmrs_backup.sql file to be still present.

FIX: added a new file: build_scripts/bahmni_mrs/bahmni_mrs_copy_default_db.sh

commit:

Also modified: bahmni Bahmni_MRS_v0_92, pipeline package - added a task to execute the above script before actual packaging onto RPM.



 

Swetha Bachugudem
August 6, 2019, 10:07 AM
Edited

The following 2 constraints are missing in the default setup.

  1. Table idgen_auto_generation_option

CONSTRAINT location_for_auto_generation_option FOREIGN KEY (location) REFERENCES location (location_id)

2. Table order_frequency

CONSTRAINT order_frequency_concept_id_fk FOREIGN KEY (concept_id) REFERENCES concept (concept_id)

Angshuman Sarkar
August 27, 2019, 5:57 AM

Commit https://github.com/Bahmni/emr-functional-tests/commit/78a0719285c9489d317b1ae3974b3e2acfe1e39d

NOTE: The Odoo database and OpenMRS database needs to be updated in master branch as well.

Fixed

Assignee

angshuman sarkar

Reporter

swathi varkala

Labels

None

Units

None

PercentDone

None

DueTime

None

Clients

None

External issue ID

None

UAT Assignee

None

Reviewer

None

Sprint

0.92 Product

Fix versions

Configure