-- ABS-92249 / ABS-97325

------- CUSTOMERLABELLAYOUTPRICE -----------

ALTER TABLE CUSTOMERLABELLAYOUTPRICE ADD (LABELLAYOUT_ID NUMBER NULL);

COMMENT ON COLUMN CUSTOMERLABELLAYOUTPRICE.LABELTYPE
IS '1 = Code label LOG
2 = Name label
3 = Domestic / Residential label
4 = Code label COG
5 = Patch price (residential)
6 = Name Label COG';
ALTER TABLE CUSTOMERLABELLAYOUTPRICE
	DROP CONSTRAINT LABELTYPE_VALID;
ALTER TABLE CUSTOMERLABELLAYOUTPRICE
	ADD CONSTRAINT CHK_CUSTLBLLAYOUTPRICE_LBLTYPE
	CHECK (LABELTYPE IN (1,2,3,4,5,6));

CREATE INDEX XIF3CUSTOMERLABELLAYOUTPRICE ON CUSTOMERLABELLAYOUTPRICE(LABELLAYOUT_ID ASC);
ALTER TABLE CUSTOMERLABELLAYOUTPRICE 
 ADD CONSTRAINT FK_CUSTLBLLAYOUTPRICE_LBLAYOUT FOREIGN KEY (LABELLAYOUT_ID)
 REFERENCES LABELLAYOUT(LABELLAYOUT_ID) ON DELETE SET NULL;