NINAnor/NOFA

2 similar constraints on "event"."datasetID"

Closed this issue · 1 comments

The event table has these constraints:

CONSTRAINT "fk_datasetID" FOREIGN KEY ("datasetID")
      REFERENCES nofa.m_dataset ("datasetID") MATCH FULL
      ON UPDATE CASCADE ON DELETE NO ACTION,

CONSTRAINT "event_fk_datasetID" FOREIGN KEY ("datasetID")
      REFERENCES nofa.m_dataset ("datasetID") MATCH SIMPLE
      ON UPDATE CASCADE ON DELETE NO ACTION,

What is the meaning of having this constraint twice?
Once with MATCH SIMPLE and once with MATCH FULL

Good catch!
MATCH FULL applies only to multicolumn foreign keys. Dropping the first one.
Renamed event constraints so they are consistent...