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