-- ABS-13018/ ABS-59770
---- CUSTOMER ----
ALTER TABLE CUSTOMER ADD (LOSSCHARGESTARTDATE DATE DEFAULT TO_DATE('31-12-2099','DD-MM-YYYY') NOT NULL);

ALTER TRIGGER CUSTOMER_CHECK_CONTRACT_USAGE DISABLE;
ALTER TRIGGER AFTER_UPDATE_CUSTOMER DISABLE;

UPDATE CUSTOMER C
SET C.LOSSCHARGESTARTDATE = C.DATEACTIVE
WHERE C.CHARGELOSSFORPOOLITEMS = 1;
COMMIT;

ALTER TRIGGER CUSTOMER_CHECK_CONTRACT_USAGE ENABLE;
ALTER TRIGGER AFTER_UPDATE_CUSTOMER ENABLE;