Skip to content

Conversation

@josheckels
Copy link
Contributor

Rationale

While adding automated test coverage for the ONPRC blood volume validation code, we discovered that having duplicate rows for a given animal in onprc_ehr.AvailableBloodVolume will cause errors when doing the validation. It also lacks a PK, making it hard for the tests to interact with it to populate testing data

Changes

  • Make the Id column NOT NULL and identify it as the primary key

@josheckels
Copy link
Contributor Author

@jonesgaohsuand @kollil can you validate this change for us? I think it will help prevent problems and lets us add the test coverage.

There's a chance it would interfere with how the data is being populated. If, for example, it loads all new rows and then deletes all of the old rows, it would violate the PK constraint, and the sequence would need to be reversed (delete the existing rows first, then load the replacement data)

…dVolume

# Conflicts:
#	onprc_ehr/resources/schemas/dbscripts/sqlserver/onprc_ehr-20.905-20.906.sql
#	onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRModule.java
@labkey-jeckels labkey-jeckels merged commit aa54527 into release20.11-SNAPSHOT Apr 1, 2021
@labkey-jeckels labkey-jeckels deleted the 20.11_fb_pkForAvailableBloodVolume branch April 1, 2021 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants