callat-qcd / lattedb

Lattice QCD database interface using EspressoDB as the content manager.
https://ithems.lbl.gov/lattedb
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

unique constraint for seqcoherentprop #54

Closed cchang5 closed 4 years ago

cchang5 commented 4 years ago

Using m2m breaks database unique constraint. Need to write a check_consistency that enforces uniqueness.

1) query table for gaugeconfig.id, fermionaction.id, sinkwave.id, sinksmear.id, sinksep.id 2) in those rows, check set uniqueness: propagator0 == (p0 for p0 in propagator0 queryset) AND propagator1 == (p1 for p1 in propagator1 queryset) If exist, then violate uniqueness.