--UPDATE FROM 8.6.3.0 TO 8.6.4.0


DROP TABLE VERSION_8_6_3_0;
DROP TABLE VERSION_8_6_3_1;
DROP TABLE VERSION_8_6_3_2;


/*  VERSION_8_6_4_0  */
CREATE TABLE VERSION_8_6_4_0 (
	 DUMMY	NUMBER	    NULL
)
;


COMMENT ON COLUMN XCMT.XCMT_TYPE IS ' 1=EMAIL  2=HOMEPAGE  3=TELEFAX  4=TELEPHONE ';

ALTER TABLE XCED ADD XCED_LEISURELANG NUMBER(1);

ALTER TABLE WLFG ADD WLFG_NOOFDAYS NUMBER(3);

COMMENT ON COLUMN WLFG.WLFG_NOOFDAYS IS 'Default number of days';

ALTER TABLE XJET ADD XJET_USE_COUNTRY_CODE NUMBER(1);

COMMENT ON COLUMN XJET.XJET_USE_COUNTRY_CODE IS '0 = use XCOU_CUSTSHORTDESC 1 = XCOU_GVMNT_ID';

CREATE TABLE XJLG (
    XJLG_ID NUMBER(30) NOT NULL
   ,XJLG_DATE DATE 
   ,XJLG_REGCARD NUMBER(30) NOT NULL
   ,XJLG_SUCCESS NUMBER(1) NOT NULL
   ,XJLG_ERROR VARCHAR2(200) 
   ,CONSTRAINT XJLG_PK PRIMARY KEY (XJLG_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8MAIN; 

CREATE SEQUENCE SEQ_XJLG INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;

COMMENT ON TABLE XJLG IS 'JetWeb export log';

CREATE TABLE YCEP (
YCEP_ID NUMBER (30,0) NOT NULL,
YCEP_YCEV_ID NUMBER (30,0),
YCEP_XCMS_ID NUMBER (30,0), CONSTRAINT YCEP_PK PRIMARY KEY (YCEP_ID) USING INDEX TABLESPACE V8INDEX  ) TABLESPACE V8MAIN ;

CREATE SEQUENCE SEQ_YCEP INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;

COMMENT ON TABLE YCEP IS 'Link table: Profiles linked to Calendar events';

CREATE INDEX YCEP_YCEV_ID ON YCEP(YCEP_YCEV_ID) TABLESPACE V8INDEX;

CREATE INDEX YCEP_XCMS_ID ON YCEP(YCEP_XCMS_ID) TABLESPACE V8INDEX;

CREATE TABLE WSCR (
    WSCR_ID NUMBER(30) NOT NULL
   ,WSCR_NAME VARCHAR2(20) NOT NULL
   ,WSCR_SCRIPT LONG NOT NULL
   ,CONSTRAINT WSCR_PK PRIMARY KEY (WSCR_ID) USING INDEX TABLESPACE V8INDEX
   ,CONSTRAINT WSCR_NAME UNIQUE (WSCR_NAME) USING INDEX TABLESPACE V8INDEX  ) TABLESPACE V8CONF ;

CREATE SEQUENCE SEQ_WSCR INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;

ALTER TABLE XJET ADD XJET_MINIMUMARRIVAL DATE;  
