Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unique constraint for metrics does not work if read_type=NULL #33

Open
aguang opened this issue Jan 30, 2020 · 0 comments
Open

unique constraint for metrics does not work if read_type=NULL #33

aguang opened this issue Jan 30, 2020 · 0 comments
Assignees

Comments

@aguang
Copy link
Member

aguang commented Jan 30, 2020

Our current unique constraint for the metrics table is: UniqueConstraint('db_id', 'qc_program', 'qc_metric', 'read_type')). However, we've been leaving read_type=NULL for programs like picardTools which do not require read type information. As NULL != NULL, this leads to multiple inserts being allowed for picardTools as long as db_id, qc_program, qc_metric is the same which is behavior we don't want. To address this, we can have read_type = -1 in cases like picardTools so that the unique constraint will still hold.

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

No branches or pull requests

2 participants