-- ABS-86049 / ABS-92892
--------------DELIVERYVARIATIONS-------------

ALTER TABLE DELIVERYVARIATIONS DROP CONSTRAINT Origin_DV_valid;

ALTER TABLE DELIVERYVARIATIONS 
      ADD (CONSTRAINT CHK_DELIVERYVARIATIONS_ORIGIN CHECK(ORIGIN IN (1, 2, 3, 4, 5, 6, 7, 8, 11)));

COMMENT ON COLUMN DELIVERYVARIATIONS.ORIGIN
	IS '1 = soilcount
2 = stock count
3 = manual entry
4 = packing note
5 = delivery note
6 = electronic order
7 = replacement
8 = settlement
11 = Reduction';