results
results copied to clipboard
NOT VALID is duplicated in constraints
If a new foreign key constraint is marked NOT VALID on initial creation, the NOT VALID statement is doubled and validation is still attempted.
ALTER TABLE "macrostrat"."unit_boundaries" ADD
CONSTRAINT "unit_boundaries_unit_id_fkey"
FOREIGN KEY (unit_id) REFERENCES macrostrat.units(id)
ON DELETE CASCADE NOT VALID NOT VALID;
ALTER TABLE "macrostrat"."unit_boundaries" VALIDATE
CONSTRAINT "unit_boundaries_unit_id_fkey";
Once the constraint actually exists in a NOT VALID state, validation is not re-attempted on each schema diff, which means that this problem is pretty minor.