-- ABS-53710/ ABS-57834

ALTER TABLE PRODUCTINFO ADD (DOCUMENTTYPE NUMBER DEFAULT 0 NOT NULL
                             CONSTRAINT DOCUMENTTYPE_VALID1_1 CHECK (DOCUMENTTYPE BETWEEN 0 AND 6));

COMMENT ON COLUMN PRODUCTINFO.DOCUMENTTYPE
  IS '0 = Additional Info
1 = Technical Sketches
2 = Certificates
3 = Product Data Sheet Intern
4 = Product Data Sheet Extern
5 = Internal Dimension table
6 = Miscellaneous
';

ALTER TABLE PRODUCTINFO
  DROP CONSTRAINT XPKPRODUCTINFO CASCADE;
ALTER TABLE PRODUCTINFO
  ADD CONSTRAINT XPKPRODUCTINFO PRIMARY KEY (PRODUCT_ID, DOCUMENTTYPE);