--- ABS-13985
---------------------   PRODUCTLISTPERCUSTOMER   ------------------------
ALTER TABLE PRODUCTLISTPERCUSTOMER ADD(MINRESIDUALVALUEAMOUNT VARCHAR2(1) DEFAULT 'N' NOT NULL
					CONSTRAINT YN_VALIDATIONFIELD262 CHECK (MINRESIDUALVALUEAMOUNT IN ('Y','N')));


---------------------   OUTOFCIRCULATIONHISTORY   ------------------------
ALTER TABLE OUTOFCIRCULATIONHISTORY ADD(MINIMUMAMOUNTCHARGED VARCHAR2(1) DEFAULT 'N' NOT NULL
					CONSTRAINT YN_VALIDATIONFIELD263 CHECK (MINIMUMAMOUNTCHARGED IN ('Y','N')));


---------------------   CUSTOMERMINRESVALUEAMOUNT   ------------------------
CREATE SEQUENCE SEQ_CUSTOMERMINRESVALUEAMOUNT
START WITH 1
INCREMENT BY 1;

CREATE TABLE CUSTOMERMINRESVALUEAMOUNT
(
CUSTOMERMINRESVALUEAMOUNT_ID NUMBER NOT NULL,
PRODUCTLISTPERCUSTOMER_ID NUMBER NOT NULL,
STARTDATE DATE NOT NULL,
AMOUNT NUMBER NOT NULL,
SYSTEMUSER_ID NUMBER NOT NULL,
TIMESTAMP DATE NOT NULL
);

ALTER TABLE CUSTOMERMINRESVALUEAMOUNT ADD CONSTRAINT XPKCUSTOMERMINRESVALUEAMOUNT PRIMARY KEY (CUSTOMERMINRESVALUEAMOUNT_ID);

CREATE INDEX XIE1CUSTOMERMINRESVALUEAMOUNT ON CUSTOMERMINRESVALUEAMOUNT(PRODUCTLISTPERCUSTOMER_ID ASC, STARTDATE ASC);

CREATE INDEX XIF1CUSTOMERMINRESVALUEAMOUNT ON CUSTOMERMINRESVALUEAMOUNT(PRODUCTLISTPERCUSTOMER_ID ASC);

ALTER TABLE CUSTOMERMINRESVALUEAMOUNT ADD CONSTRAINT CUSTOMERMINRESVALUEAMOUNT_PLPC FOREIGN KEY (PRODUCTLISTPERCUSTOMER_ID)
REFERENCES PRODUCTLISTPERCUSTOMER (PRODUCTLISTPERCUSTOMER_ID) ON DELETE CASCADE;
