-- ABS-71966 / ABS-82188
--- CONTRACTEMBTEMPLINE ---
ALTER TABLE CONTRACTEMBTEMPLINE
DROP CONSTRAINT EMBLEMTYPE_VALID1_1;

ALTER TABLE CONTRACTEMBTEMPLINE ADD (CUSTOMCOLOR VARCHAR2(1) DEFAULT 'N' NOT NULL
          CONSTRAINT CHK_CONTRACTEMBTEMPLINE_CUSCOL CHECK (CUSTOMCOLOR IN ('Y','N')),
             CUSTOMSIZE VARCHAR2(1) DEFAULT 'N' NOT NULL
          CONSTRAINT CHK_CONTRACTEMBTEMPLINE_CUSIZE CHECK (CUSTOMSIZE IN ('Y','N')),
             DESCRIPTION2 VARCHAR2(80) NULL,
             STYLECODE NUMBER DEFAULT 0 NOT NULL
          CONSTRAINT CHK_CONTRACTEMBTEMPLINE_STYLE CHECK (STYLECODE IN (0,1,2,3)),
             CUSTOMERSUPPLIED VARCHAR2(1) DEFAULT 'N' NOT NULL
          CONSTRAINT CHK_CONTRACTEMBTEMPLINE_CUSUP CHECK (CUSTOMERSUPPLIED IN ('Y','N')));

COMMENT ON COLUMN CONTRACTEMBTEMPLINE.EMBLEMTYPE IS '1= Company
2 = Name
3 = Other/ Not Defined
4 = Title';

COMMENT ON COLUMN CONTRACTEMBTEMPLINE.STYLECODE IS '0 = Not applicable
1 = Emblem
2 = Direct embroidery
3 = Screen print';

ALTER TABLE CONTRACTEMBTEMPLINE ADD CONSTRAINT CHK_CONTRACTEMBTEMPLINE_EMBT CHECK (EMBLEMTYPE IN (1,2,3,4));