--ABS-69053

--- CONTRACTCUSTOMERBRAND ---
DROP TABLE CONTRACTCUSTOMERBRAND;

CREATE TABLE CONTRACTCUSTOMERBRAND
(
CONTRACTCUSTOMER_ID NUMBER NOT NULL,
CONTRACTBRAND_ID NUMBER NOT NULL,
SYSTEMUSER_ID NUMBER NOT NULL,
TIMESTAMP DATE NOT NULL
);

ALTER TABLE CONTRACTCUSTOMERBRAND ADD CONSTRAINT XPKCONTRACTCUSTOMERBRAND PRIMARY KEY (CONTRACTCUSTOMER_ID);

CREATE INDEX XIF1CONTRACTCUSTOMERBRAND ON CONTRACTCUSTOMERBRAND (CONTRACTBRAND_ID ASC);

ALTER TABLE CONTRACTCUSTOMERBRAND ADD CONSTRAINT CONTRACTCUSTOMERBRAND_CONBRAND FOREIGN KEY (CONTRACTBRAND_ID)
REFERENCES CONTRACTBRAND (CONTRACTBRAND_ID) ON DELETE CASCADE;