-- ABS-70820 / ABS-70895
--- CUSTOMER ---
ALTER TABLE CUSTOMER DROP COLUMN STORENUMBER;

--- CUSTOMEREXTRAINFO ---
CREATE TABLE CUSTOMEREXTRAINFO
(
	CUSTOMER_ID NUMBER NOT NULL,
	STORENUMBER VARCHAR2(10) NULL,
	SYSTEMUSER_ID NUMBER NOT NULL,
	TIMESTAMP DATE NOT NULL
);

COMMENT ON COLUMN CUSTOMEREXTRAINFO.STORENUMBER IS 'For storing the customer’s identifier for the site.  If USPS module, this comes from a master table, else free text entry';

ALTER TABLE CUSTOMEREXTRAINFO ADD CONSTRAINT XPKCUSTOMEREXTRAINFO PRIMARY KEY (CUSTOMER_ID);

ALTER TABLE CUSTOMEREXTRAINFO ADD CONSTRAINT CUSTOMEREXTRAINFO_CID FOREIGN KEY (CUSTOMER_ID)
REFERENCES CUSTOMER (CUSTOMER_ID) ON DELETE CASCADE;