-- ABS-145155 Waive emblem and prep charges on the first invoice for the wearer if the wearer is created before the customer is installed / ABS-145755

ALTER TABLE WEARER
ADD (CREATIONDATE DATE DEFAULT SYSDATE NOT NULL);
COMMENT ON COLUMN WEARER.CREATIONDATE
  IS 'Automatically gets sysdate (date not date and time) when record is created';
  
-- SET THE VALUE FOR EXISTING RECORDS (WEARER.CREATIONDATE = WEARER.DATEACTIVE)
UPDATE WEARER W SET W.CREATIONDATE = W.DATEACTIVE;
COMMIT;