--ABS-120001

CREATE TABLE PRODUCTAXAPTA
(
PRODUCT_ID          NUMBER NOT NULL,
AXAPTAPRODUCTSTATUS	NUMBER NOT NULL CONSTRAINT CHK_PRODUCTAXAPTA_PRODUCTSTATUS CHECK (AXAPTAPRODUCTSTATUS IN (0,1,2)),
SYSTEMUSER_ID       NUMBER NOT NULL,
TIMESTAMP           DATE NOT NULL
);

COMMENT ON COLUMN PRODUCTAXAPTA.AXAPTAPRODUCTSTATUS IS
'0 = Active
1 = End of Life
2 = Expired';

ALTER TABLE PRODUCTAXAPTA
ADD CONSTRAINT XPKPRODUCTAXAPTA PRIMARY KEY (PRODUCT_ID);


ALTER TABLE PRODUCTAXAPTA
ADD CONSTRAINT FK_PRODUCTAXAPTA_PRODUCTID FOREIGN KEY (PRODUCT_ID)
REFERENCES PRODUCT (PRODUCT_ID)ON DELETE CASCADE;
