-- Order 20016098.60 EDI Enhancements
-----------------------EDIINFO TABLE-------------------------

CREATE SEQUENCE SEQ_EDIINFO
START WITH 1
INCREMENT BY 1;

CREATE TABLE EDIINFO 
	 (EDIINFO_ID	NUMBER NOT NULL,	
	          CODE	VARCHAR2(6)	NOT NULL,	
	          DESCRIPTION	VARCHAR2(30)	NOT NULL,	
	          IDENTIFIER1	VARCHAR2(100)	NULL,	
	          IDENTIFIER2	VARCHAR2(100)	NULL,	
	          IDENTIFIER3	VARCHAR2(100)	NULL,	
	          IDENTIFIER4	VARCHAR2(100)	NULL,	
	          SYSTEMUSER_ID	NUMBER NOT NULL,
	          TIMESTAMP	DATE NOT NULL);

ALTER TABLE EDIINFO 
ADD CONSTRAINT  XPKEDIINFO  PRIMARY KEY (EDIINFO_ID);

CREATE UNIQUE INDEX XAK1EDIINFO ON EDIINFO
(CODE   ASC);

-----------------------CUSTOMER TABLE-------------------------

ALTER TABLE CUSTOMER
	ADD (EDIINFO_ID NUMBER  NULL);


CREATE  INDEX XIF47CUSTOMER ON CUSTOMER
(EDIINFO_ID   ASC);

ALTER TABLE CUSTOMER
ADD CONSTRAINT CUSTOMER_EDIINFO FOREIGN KEY (EDIINFO_ID) REFERENCES EDIINFO (EDIINFO_ID); 

















