--ABS-64234 / ABS-101258
----CONTRACTCOMPONENTGRMCHARGES--------
ALTER TABLE CONTRACTCOMPONENTGRMCHARGES ADD (NOEMBLEMCHARGE1STINVOICE VARCHAR2(1) NULL CONSTRAINT CHK_CONTRCOMPGRMCH_NOEMB1INV CHECK (NOEMBLEMCHARGE1STINVOICE IN ('Y','N')),
			NOPREPCHARGE1STINVOICE VARCHAR2(1) NULL CONSTRAINT CHK_CONTRCOMPGRMCH_NOPREP1INV CHECK (NOPREPCHARGE1STINVOICE IN ('Y','N')));


--------------------------------CUSTOMERGARMENTCHARGES----------------


CREATE TABLE CUSTOMERGARMENTCHARGES
(
	CUSTOMER_ID              NUMBER NOT NULL,
	NOEMBLEMCHARGE1STINVOICE VARCHAR2(1) DEFAULT 'N' NOT NULL CONSTRAINT CHK_CUSTGRMCH_NOEMB1INV CHECK (NOEMBLEMCHARGE1STINVOICE IN ('Y','N')),
	NOPREPCHARGE1STINVOICE   VARCHAR2(1) DEFAULT 'N' NOT NULL CONSTRAINT CHK_CUSTGRMCH_NOPREP1INV CHECK (NOPREPCHARGE1STINVOICE IN ('Y','N')),
	SYSTEMUSER_ID            NUMBER NOT NULL,
	TIMESTAMP                DATE NOT NULL 
);


ALTER TABLE CUSTOMERGARMENTCHARGES ADD CONSTRAINT XPKCUSTOMERGARMENTCHARGES PRIMARY KEY (CUSTOMER_ID);

ALTER TABLE CUSTOMERGARMENTCHARGES ADD CONSTRAINT FK_CUSTOMERGARMENTCHARGES_CUST FOREIGN KEY (CUSTOMER_ID)
REFERENCES CUSTOMER (CUSTOMER_ID) ON DELETE CASCADE;
