/************************************************************************************************************************
*
*
*  Date: October 28, 2005  19:32:36
*
*  This upgrade script was automatically generated by DBDiff for Oracle (www.dbdiff.com)
*
*  SOURCE DATABASE:  VERSION_8_6_0_0@V8
*  TARGET DATABASE:  VERSION_8_5_0_8@V8
*
*  This script should be executed as VERSION_8_5_0_8 in database VERSION_8_5_0_8@V8 except where otherwise noted.
*
*  IMPORTANT:  As with any script, you should always perform a sanity check before executing it in your target database.
*
*
************************************************************************************************************************/




/************************************************************************************************************************
*
*  sequences
*
*  The following statements will upgrade the sequences
*
************************************************************************************************************************/

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


/************************************************************************************************************************
*
*  tables
*
*  538 tables were found in VERSION_8_6_0_0@V8
*  488 tables were found in VERSION_8_5_0_8@V8
*
************************************************************************************************************************/




/************************************************************************************************************************
*
*  The following statements will drop tables that DO NOT exist in VERSION_8_6_0_0@V8
*
************************************************************************************************************************/


DROP TABLE VERSION_8_5_0_8;

DROP TABLE VERSION_8_5_0_9;

DROP TABLE VERSION_8_5_0_10;

DROP TABLE YBMF;


/************************************************************************************************************************
*
*  The following statements will create tables that DO NOT exist in VERSION_8_5_0_8@V8
*
************************************************************************************************************************/


/*  ARPL  */
CREATE TABLE ARPL (
	 ARPL_ID	NUMBER(30)	NOT NULL
	,ARPL_ARLG_ID	NUMBER(30)	NOT NULL
	,ARPL_ZTXT_ID	NUMBER(30)	    NULL
	,ARPL_WMAI_ID	NUMBER(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ARPL ADD (
	CONSTRAINT ARPL_PK
	PRIMARY KEY
	            (
	             ARPL_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ARPL_ARLG_ID ON ARPL
	(
	  ARPL_ARLG_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ARPL_WMAI_ID ON ARPL
	(
	  ARPL_WMAI_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ARPL_ZTXT_ID ON ARPL
	(
	  ARPL_ZTXT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  RPAS  */
CREATE TABLE RPAS (
	 RPAS_ID	NUMBER(30)	NOT NULL
	,RPAS_NAME	VARCHAR2(256)	    NULL
	,RPAS_RPDW_ID	NUMBER(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8LARGE
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE RPAS ADD (
	CONSTRAINT RPAS_PK
	PRIMARY KEY
	            (
	             RPAS_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX RPAS_RPDW_ID ON RPAS
	(
	  RPAS_RPDW_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  RPCB  */
CREATE TABLE RPCB (
	 RPCB_ID	NUMBER(30)	NOT NULL
	,RPCB_NAME	VARCHAR2(256)	    NULL
	,RPCB_RPDW_ID	NUMBER(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE RPCB ADD (
	CONSTRAINT RPCB_PK
	PRIMARY KEY
	            (
	             RPCB_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX RPCB_RPDW_ID ON RPCB
	(
	  RPCB_RPDW_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  RPCF  */
CREATE TABLE RPCF (
	 RPCF_ID	NUMBER(30)	NOT NULL
	,RPCF_NAME	VARCHAR2(256)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE RPCF ADD (
	CONSTRAINT RPCF_PK
	PRIMARY KEY
	            (
	             RPCF_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  RPDW  */
CREATE TABLE RPDW (
	 RPDW_ID	NUMBER(30)	NOT NULL
	,RPDW_LAYOUT	LONG RAW	NOT NULL
	,RPDW_TYPE	NUMBER(2)	NOT NULL
	,RPDW_DEFAULT_YSSL_ID	NUMBER(30)	    NULL
	,RPDW_EDITED	NUMBER(1)	    NULL
	,RPDW_ACCEPTED_NOOFATTENDEES	NUMBER(30)	    NULL
	,RPDW_BASE_DRAWING_EDITED	NUMBER(1)	    NULL
	,RPDW_RPPL_ID	NUMBER(30)	    NULL
	,RPDW_PRINT_X	FLOAT	    NULL
	,RPDW_PRINT_Y	FLOAT	    NULL
	,RPDW_PRINT_SCALE	FLOAT	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8LARGE
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE RPDW ADD (
	CONSTRAINT RPDW_PK
	PRIMARY KEY
	            (
	             RPDW_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX RPDW_DEFAULT_YSSL_ID ON RPDW
	(
	  RPDW_DEFAULT_YSSL_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX RPDW_RPPL_ID ON RPDW
	(
	  RPDW_RPPL_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  RPLS  */
CREATE TABLE RPLS (
	 RPLS_ID	NUMBER(30)	NOT NULL
	,RPLS_RPCF_ID	NUMBER(30)	NOT NULL
	,RPLS_ORD	NUMBER(10)	NOT NULL
	,RPLS_NAME	VARCHAR2(200)	NOT NULL
	,RPLS_RED	FLOAT		NOT NULL
	,RPLS_GREEN	FLOAT		NOT NULL
	,RPLS_BLUE	FLOAT		NOT NULL
	,RPLS_ALPHA	FLOAT		NOT NULL
	,RPLS_LRED	FLOAT		NOT NULL
	,RPLS_LGREEN	FLOAT		NOT NULL
	,RPLS_LBLUE	FLOAT		NOT NULL
	,RPLS_LALPHA	FLOAT		NOT NULL
	,RPLS_LINEWIDTH	FLOAT		NOT NULL
	,RPLS_STIPPLE	INTEGER		NOT NULL
	,RPLS_HASFILL	NUMBER(1)	NOT NULL
	,RPLS_HASLINES	NUMBER(1)	NOT NULL
	,RPLS_HASDIMENSIONFONTS	NUMBER(1)	NOT NULL
	,RPLS_DIM_TYPEFACE	VARCHAR2(32)	    NULL
	,RPLS_DIM_RED	FLOAT	    NULL
	,RPLS_DIM_GREEN	FLOAT	    NULL
	,RPLS_DIM_BLUE	FLOAT	    NULL
	,RPLS_DIM_ALPHA	FLOAT	    NULL
	,RPLS_DIM_BOLD	NUMBER(1)   NULL
	,RPLS_DIM_ITALIC	NUMBER(1)	    NULL
	,RPLS_DIM_UNDERLINE	NUMBER(1)	    NULL
	,RPLS_DIM_STRIKEOUT	NUMBER(1)	    NULL
	,RPLS_LABEL_TYPEFACE	VARCHAR2(32)	    NULL
	,RPLS_LABEL_FONTSIZE	FLOAT	    NULL
	,RPLS_LABEL_RED		FLOAT	    NULL
	,RPLS_LABEL_GREEN	FLOAT	    NULL
	,RPLS_LABEL_BLUE	FLOAT	    NULL
	,RPLS_LABEL_ALPHA	FLOAT	    NULL
	,RPLS_LABEL_BOLD	NUMBER(1)	    NULL
	,RPLS_LABEL_ITALIC	NUMBER(1)	    NULL
	,RPLS_LABEL_UNDERLINE	NUMBER(1)	    NULL
	,RPLS_LABEL_STRIKEOUT	NUMBER(1)	    NULL
	,RPLS_HASLABELFONTS	NUMBER(1)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE RPLS ADD (
	CONSTRAINT RPLS_PK
	PRIMARY KEY
	            (
	             RPLS_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX RPLS_RPCF_ID ON RPLS
	(
	  RPLS_RPCF_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  RPPL  */
CREATE TABLE RPPL (
	 RPPL_ID	NUMBER(30)	NOT NULL
	,RPPL_NAME	VARCHAR2(256)	    NULL
	,RPPL_LAYOUT	LONG RAW	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE RPPL ADD (
	CONSTRAINT RPPL_PK
	PRIMARY KEY
	            (
	             RPPL_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  RPSY  */
CREATE TABLE RPSY (
	 RPSY_ID	NUMBER(30)	NOT NULL
	,RPSY_YCIT_ID	NUMBER(30)	    NULL
	,RPSY_RPDW_ID	NUMBER(30)	    NULL
	,RPSY_NAME	VARCHAR2(256)	    NULL
	,RPSY_DEFAULT_LAYER	NUMBER(10)  NULL
	,RPSY_ROLE	NUMBER(30)	    NULL
	,RPSY_IS_BITMAP	NUMBER(1)	    NULL
	,RPSY_UNIQUE_STAMP	VARCHAR2(64)	    NULL
	,RPSY_IS_ARCHIVED	NUMBER(1)   NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE RPSY ADD (
	CONSTRAINT RPSY_PK
	PRIMARY KEY
	            (
	             RPSY_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX RPSY_RPDW_ID ON RPSY
	(
	  RPSY_RPDW_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX RPSY_YCIT_ID ON RPSY
	(
	  RPSY_YCIT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  VERSION_8_6_0_0  */
CREATE TABLE VERSION_8_6_0_0 (
	 DUMMY	NUMBER	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;


/*  WDTC  */
CREATE TABLE WDTC (
	 WDTC_ID	NUMBER(30)	NOT NULL
	,WDTC_WPHS_ID	NUMBER(30)	NOT NULL
	,WDTC_TIMESTAMP	DATE	NOT NULL
	,WDTC_CONFIG	LONG	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WDTC ADD (
	CONSTRAINT WDTC_PK
	PRIMARY KEY
	            (
	             WDTC_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
ALTER TABLE WDTC ADD (
	CONSTRAINT WDTC_WPHS_ID
	UNIQUE
	       (
	        WDTC_WPHS_ID
	       )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  WHFU  */
CREATE TABLE WHFU (
	 WHFU_ID	NUMBER(30)	NOT NULL
	,WHFU_WPHS_ID	NUMBER(30)	NOT NULL
	,WHFU_FIELDNAME	VARCHAR2(60)	NOT NULL
	,WHFU_READ	NUMBER(1)	    NULL
	,WHFU_WRITE	NUMBER(1)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WHFU ADD (
	CONSTRAINT WHFU_PK
	PRIMARY KEY
	            (
	             WHFU_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX WHFU_WPHS_ID ON WHFU
	(
	  WHFU_WPHS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  WICC  */
CREATE TABLE WICC (
	 WICC_ID	NUMBER(30)	NOT NULL
	,WICC_WPCA_ID	NUMBER(30)	NOT NULL
	,WICC_ONLINE	NUMBER(1)	NOT NULL
	,WICC_ADDRESS	VARCHAR2(60)	    NULL
	,WICC_PORT	NUMBER(6)	    NULL
	,WICC_OFFLINE	NUMBER(1)	NOT NULL
	,WICC_POLLINTERVAL	NUMBER(10)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WICC ADD (
	CONSTRAINT WICC_PK
	PRIMARY KEY
	            (
	             WICC_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX WICC_WPCA_ID ON WICC
	(
	  WICC_WPCA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  WICL  */
CREATE TABLE WICL (
	 WICL_ID	NUMBER(30)	NOT NULL
	,WICL_TIMESTAMP	DATE	NOT NULL
	,WICL_MSGNAME	VARCHAR2(60)	    NULL
	,WICL_MSG	LONG	    NULL
	,WICL_WPCA_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WICL ADD (
	CONSTRAINT WICL_PK
	PRIMARY KEY
	            (
	             WICL_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX WICL_WPCA_ID ON WICL
	(
	  WICL_WPCA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  WICM  */
CREATE TABLE WICM (
	 WICM_ID	NUMBER(30)	NOT NULL
	,WICM_ADDRESS	VARCHAR2(15)	NOT NULL
	,WICM_PORT	NUMBER(6)	NOT NULL
	,WICM_TIMESTAMP	DATE	    NULL
	,WICM_WPCA_ID	NUMBER(30)	    NULL
	,WICM_UNIQUEIDPERCLIENT	VARCHAR2(60)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WICM ADD (
	CONSTRAINT WICM_PK
	PRIMARY KEY
	            (
	             WICM_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX WICM_WPCA_ID ON WICM
	(
	  WICM_WPCA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  WPDT  */
CREATE TABLE WPDT (
	 WPDT_ID	NUMBER(30)	NOT NULL
	,WPDT_WPHS_ID	NUMBER(30)	NOT NULL
	,WPDT_TABLENAME	VARCHAR2(4)	NOT NULL
	,WPDT_TOFROM	NUMBER(1)	NOT NULL
	,WPDT_FROMID	NUMBER(30)	NOT NULL
	,WPDT_TOID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WPDT ADD (
	CONSTRAINT WPDT_PK
	PRIMARY KEY
	            (
	             WPDT_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX WPDT_WPHS_ID ON WPDT
	(
	  WPDT_WPHS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  WPHS  */
CREATE TABLE WPHS (
	 WPHS_ID	NUMBER(30)	NOT NULL
	,WPHS_CODE	VARCHAR2(5)	NOT NULL
	,WPHS_NAME	VARCHAR2(200)	NOT NULL
	,WPHS_URL	VARCHAR2(200)	    NULL
	,WPHS_ACTIVE	NUMBER(1)	    NULL
	,WPHS_USERNAME	VARCHAR2(60)	    NULL
	,WPHS_PASSWORD	VARCHAR2(60)	    NULL
	,WPHS_ALLOWPROFILELOOKUP	NUMBER(10)	    NULL
	,WPHS_TRANSLCONFTIME	DATE	    NULL
	,WPHS_RESERVATION	NUMBER(1)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WPHS ADD (
	CONSTRAINT WPHS_PK
	PRIMARY KEY
	            (
	             WPHS_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
ALTER TABLE WPHS ADD (
	CONSTRAINT WPHS_CODE
	UNIQUE
	       (
	        WPHS_CODE
	       )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
ALTER TABLE WPHS ADD (
	CONSTRAINT WPHS_NAME
	UNIQUE
	       (
	        WPHS_NAME
	       )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  WPML  */
CREATE TABLE WPML (
	 WPML_ID	NUMBER(30)	NOT NULL
	,WPML_TIMESTAMP	DATE	NOT NULL
	,WPML_FROMLOCALTOSERVER	NUMBER(1)	NOT NULL
	,WPML_XCMS_ID	NUMBER(30)	NOT NULL
	,WPML_LOG	LONG	NOT NULL
	,WPML_XCED_ID	NUMBER(30)	NOT NULL
	,WPML_PROFILESYNC	NUMBER(1) DEFAULT 0 	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WPML ADD (
	CONSTRAINT WPML_PK
	PRIMARY KEY
	            (
	             WPML_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX WPML_XCED_ID ON WPML
	(
	  WPML_XCED_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX WPML_XCMS_ID ON WPML
	(
	  WPML_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  WPSL  */
CREATE TABLE WPSL (
	 WPSL_ID	NUMBER(30)	NOT NULL
	,WPSL_TIME	DATE	NOT NULL
	,WPSL_LOG	LONG	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WPSL ADD (
	CONSTRAINT WPSL_PK
	PRIMARY KEY
	            (
	             WPSL_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  WSPS  */
CREATE TABLE WSPS (
	 WSPS_ID	NUMBER(30)	NOT NULL
	,WSPS_DESCRIPTION	VARCHAR2(30)	    NULL
	,WSPS_SERVICE	VARCHAR2(30)	    NULL
	,WSPS_USERNAME	VARCHAR2(30)	    NULL
	,WSPS_PASSWORD	VARCHAR2(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WSPS ADD (
	CONSTRAINT WSPS_PK
	PRIMARY KEY
	            (
	             WSPS_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  XMZF  */
CREATE TABLE XMZF (
	 XMZF_ID	NUMBER(30)	NOT NULL
	,XMZF_XMNR_ID	NUMBER(30)	NOT NULL
	,XMZF_ZFAC_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XMZF ADD (
	CONSTRAINT XMZF_PK
	PRIMARY KEY
	            (
	             XMZF_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XMZF_XMNR_ID ON XMZF
	(
	  XMZF_XMNR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XMZF_ZFAC_ID ON XMZF
	(
	  XMZF_ZFAC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XNDL  */
CREATE TABLE XNDL (
	 XNDL_ID	NUMBER(30)	NOT NULL
	,XNDL_ONE_XCMS_ID	NUMBER(30)	NOT NULL
	,XNDL_OTHER_XCMS_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XNDL ADD (
	CONSTRAINT XNDL_PK
	PRIMARY KEY
	            (
	             XNDL_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XNDL_ONE_XCMS_ID ON XNDL
	(
	  XNDL_ONE_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XNDL_OTHER_XCMS_ID ON XNDL
	(
	  XNDL_OTHER_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XPDT  */
CREATE TABLE XPDT (
	 XPDT_ID	NUMBER(30)	NOT NULL
	,XPDT_XCMS_ID	NUMBER(30)	NOT NULL
	,XPDT_OTHER_XCMS_ID	NUMBER(30)	    NULL
	,XPDT_POINT	NUMBER(5)	    NULL
	,XPDT_TIME	DATE	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XPDT ADD (
	CONSTRAINT XPDT_PK
	PRIMARY KEY
	            (
	             XPDT_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XPDT_OTHER_XCMS_ID ON XPDT
	(
	  XPDT_OTHER_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XPDT_TIME ON XPDT
	(
	  XPDT_TIME
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XPDT_XCMS_ID ON XPDT
	(
	  XPDT_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XPMI  */
CREATE TABLE XPMI (
	 XPMI_ID	NUMBER(30)	NOT NULL
	,XPMI_XCMS_ID	NUMBER(30)	NOT NULL
	,XPMI_TIMESTAMP	DATE	NOT NULL
	,XPMI_POINT	NUMBER(5)	NOT NULL
	,XPMI_CANDIDATE_XCMS_ID	NUMBER(30)	    NULL
	,XPMI_UPLOADPOINT	NUMBER(5)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XPMI ADD (
	CONSTRAINT XPMI_PK
	PRIMARY KEY
	            (
	             XPMI_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
ALTER TABLE XPMI ADD (
	CONSTRAINT XPMI_XCMS_ID
	UNIQUE
	       (
	        XPMI_XCMS_ID
	       )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XPMI_CANDIDATE_XCMS_ID ON XPMI
	(
	  XPMI_CANDIDATE_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XPMI_POINT ON XPMI
	(
	  XPMI_POINT
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XPMI_TIMESTAMP ON XPMI
	(
	  XPMI_TIMESTAMP
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XPMI_UPLOADPOINT ON XPMI
	(
	  XPMI_UPLOADPOINT
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XPMR  */
CREATE TABLE XPMR (
	 XPMR_ID	NUMBER(30)	NOT NULL
	,XPMR_NAME	VARCHAR2(20)	NOT NULL
	,XPMR_CLIENTENTERED	NUMBER(1)	NOT NULL
	,XPMR_SERVERENTERED	NUMBER(1)	NOT NULL
	,XPMR_BOTHENTERED	NUMBER(1)	NOT NULL
	,XPMR_TYPE	NUMBER(1)	NOT NULL
	,XPMR_SYNC	NUMBER(1) DEFAULT 0 	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XPMR ADD (
	CONSTRAINT XPMR_PK
	PRIMARY KEY
	            (
	             XPMR_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  XRET  */
CREATE TABLE XRET (
	 XRET_ID	NUMBER(30)	NOT NULL
	,XRET_XPDA_ID	NUMBER(30)	NOT NULL
	,XRET_ZDCO_ID	NUMBER(30)	NOT NULL
	,XRET_PRICE	NUMBER(30,4)	    NULL
	,XRET_POSTRHYTHYM	NUMBER(1)	    NULL
	,XRET_NOTRETURNPRICE	NUMBER(30,4)	    NULL
	,XRET_FROMDATE	DATE	NOT NULL
	,XRET_TODATE	DATE	NOT NULL
	,XRET_DEPOSIT	NUMBER(1)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XRET ADD (
	CONSTRAINT XRET_PK
	PRIMARY KEY
	            (
	             XRET_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XRET_XPDA_ID ON XRET
	(
	  XRET_XPDA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XRET_ZDCO_ID ON XRET
	(
	  XRET_ZDCO_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YBCF  */
CREATE TABLE YBCF (
	 YBCF_ID	NUMBER(30)	NOT NULL
	,YBCF_YBOM_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YBCF ADD (
	CONSTRAINT YBCF_PK
	PRIMARY KEY
	            (
	             YBCF_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YBCF_YBOM_ID ON YBCF
	(
	  YBCF_YBOM_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YECF  */
CREATE TABLE YECF (
	 YECF_ID	NUMBER(30)	NOT NULL
	,YECF_YEVM_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YECF ADD (
	CONSTRAINT YECF_PK
	PRIMARY KEY
	            (
	             YECF_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YECF_YEVM_ID ON YECF
	(
	  YECF_YEVM_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YELA  */
CREATE TABLE YELA (
	 YELA_ID	NUMBER(30)	NOT NULL
	,YELA_YBLA_ID	NUMBER(30)	NOT NULL
	,YELA_YEVM_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YELA ADD (
	CONSTRAINT YELA_PK
	PRIMARY KEY
	            (
	             YELA_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YELA_YBLA_ID ON YELA
	(
	  YELA_YBLA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YELA_YEVM_ID ON YELA
	(
	  YELA_YEVM_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YFRN  */
CREATE TABLE YFRN (
	 YFRN_ID	NUMBER(30)	NOT NULL
	,YFRN_ZFAC_ID	NUMBER(30)	    NULL
	,YFRN_XCMS_ID	NUMBER(30)	    NULL
	,YFRN_NUMBER	NUMBER(30)	NOT NULL
	,YFRN_VALIDUNTIL	DATE	    NULL
	,YFRN_MAXADULTS	NUMBER(3)	    NULL
	,YFRN_TRANSFERABLE	NUMBER(1)	NOT NULL
	,YFRN_COMMENT	VARCHAR2(2000)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YFRN ADD (
	CONSTRAINT YFRN_PK
	PRIMARY KEY
	            (
	             YFRN_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YFRN_XCMS_ID ON YFRN
	(
	  YFRN_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YFRN_ZFAC_ID ON YFRN
	(
	  YFRN_ZFAC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YPUB  */
CREATE TABLE YPUB (
	 YPUB_ID	NUMBER(30)	NOT NULL
	,YPUB_SHORTDESC	VARCHAR2(3)	NOT NULL
	,YPUB_LONGDESC	VARCHAR2(30)	NOT NULL
	,YPUB_INACTIVE	NUMBER(1)	    NULL
	,YPUB_DISPLORDER	NUMBER(3)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YPUB ADD (
	CONSTRAINT YPUB_PK
	PRIMARY KEY
	            (
	             YPUB_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YPUB_DISPLORDER ON YPUB
	(
	  YPUB_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YROG  */
CREATE TABLE YROG (
	 YROG_ID	NUMBER(30)	NOT NULL
	,YROG_SHORTDESC	VARCHAR2(3)	NOT NULL
	,YROG_LONGDESC	VARCHAR2(30)	NOT NULL
	,YROG_INACTIVE	NUMBER(1)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YROG ADD (
	CONSTRAINT YROG_PK
	PRIMARY KEY
	            (
	             YROG_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  YROL  */
CREATE TABLE YROL (
	 YROL_ID	NUMBER(30)	NOT NULL
	,YROL_YROG_ID	NUMBER(30)	NOT NULL
	,YROL_YROS_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YROL ADD (
	CONSTRAINT YROL_PK
	PRIMARY KEY
	            (
	             YROL_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YROL_YROG_ID ON YROL
	(
	  YROL_YROG_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YROL_YROS_ID ON YROL
	(
	  YROL_YROS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YROP  */
CREATE TABLE YROP (
	 YROP_ID	NUMBER(30)	NOT NULL
	,YROP_PERCENTAGE	NUMBER(5,2)	NOT NULL
	,YROP_ZDCO_STATS_TYPE	NUMBER(1)	NOT NULL
	,YROP_YROG_ID	NUMBER(30)	    NULL
	,YROP_DOPOST	NUMBER(1)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YROP ADD (
	CONSTRAINT YROP_PK
	PRIMARY KEY
	            (
	             YROP_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YROP_YROG_ID ON YROP
	(
	  YROP_YROG_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YROS  */
CREATE TABLE YROS (
	 YROS_ID	NUMBER(30)	NOT NULL
	,YROS_XCMS_ID	NUMBER(30)	NOT NULL
	,YROS_YRMS_ID	NUMBER(30)	NOT NULL
	,YROS_VALIDFROM	DATE	NOT NULL
	,YROS_VALIDUNTIL	DATE	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YROS ADD (
	CONSTRAINT YROS_PK
	PRIMARY KEY
	            (
	             YROS_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YROS_XCMS_ID ON YROS
	(
	  YROS_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YROS_YRMS_ID ON YROS
	(
	  YROS_YRMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YXCH  */
CREATE TABLE YXCH (
	 YXCH_ID	NUMBER(30)	NOT NULL
	,YXCH_YRES_ID	NUMBER(30)	NOT NULL
	,YXCH_ZCUR_ID	NUMBER(30)	NOT NULL
	,YXCH_PACKAGEORFC	NUMBER(1)	NOT NULL
	,YXCH_EXCHANGERATE	NUMBER(30,18)	NOT NULL
	,YXCH_REVERSE	NUMBER(1)	NOT NULL
	,YXCH_LASTUPDATE	DATE	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YXCH ADD (
	CONSTRAINT YXCH_PK
	PRIMARY KEY
	            (
	             YXCH_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YXCH_YRES_ID ON YXCH
	(
	  YXCH_YRES_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YXCH_ZCUR_ID ON YXCH
	(
	  YXCH_ZCUR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZBOF  */
CREATE TABLE ZBOF (
	 ZBOF_ID	NUMBER(30)	NOT NULL
	,ZBOF_ZDCO_ID	NUMBER(30)	NOT NULL
	,ZBOF_FIELDNAME	VARCHAR2(30)	NOT NULL
	,ZBOF_FIELDTYPE	NUMBER(2)	NOT NULL
	,ZBOF_NUMVALUE	NUMBER(30)	    NULL
	,ZBOF_FLOATVALUE	NUMBER(30,4)	    NULL
	,ZBOF_STRINGVALUE	VARCHAR2(255)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZBOF ADD (
	CONSTRAINT ZBOF_PK
	PRIMARY KEY
	            (
	             ZBOF_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ZBOF_ZDCO_ID ON ZBOF
	(
	  ZBOF_ZDCO_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZFPD  */
CREATE TABLE ZFPD (
	 ZFPD_ID	NUMBER(30)	NOT NULL
	,ZFPD_XPDA_ID	NUMBER(30)	NOT NULL
	,ZFPD_ZFAC_ID	NUMBER(30)	NOT NULL
	,ZFPD_ORIGINATED_ZFAC_ID	NUMBER(30)	    NULL
	,ZFPD_CREATED	DATE	    NULL
	,ZFPD_RETURNED	DATE	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZFPD ADD (
	CONSTRAINT ZFPD_PK
	PRIMARY KEY
	            (
	             ZFPD_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ZFPD_ORIGINATED_ZFAC_ID ON ZFPD
	(
	  ZFPD_ORIGINATED_ZFAC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZFPD_XPDA_ID ON ZFPD
	(
	  ZFPD_XPDA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZFPD_ZFAC_ID ON ZFPD
	(
	  ZFPD_ZFAC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZIBN  */
CREATE TABLE ZIBN (
	 ZIBN_ID	NUMBER(30)	NOT NULL
	,ZIBN_NUMBER	VARCHAR2(60)	NOT NULL
	,ZIBN_DATE	DATE	    NULL
	,ZIBN_ZINN_ID	NUMBER(30)	    NULL
	,ZIBN_FAILED_ZWIN_ID	NUMBER(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZIBN ADD (
	CONSTRAINT ZIBN_PK
	PRIMARY KEY
	            (
	             ZIBN_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ZIBN_FAILED_ZWIN_ID ON ZIBN
	(
	  ZIBN_FAILED_ZWIN_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZIBN_ZINN_ID ON ZIBN
	(
	  ZIBN_ZINN_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZIPF  */
CREATE TABLE ZIPF (
	 ZIPF_ID	NUMBER(30)	NOT NULL
	,ZIPF_ZITR_ID	NUMBER(30)	NOT NULL
	,ZIPF_MMOD_ID	NUMBER(30)	NOT NULL
	,ZIPF_PROCESSED	NUMBER(1)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZIPF ADD (
	CONSTRAINT ZIPF_PK
	PRIMARY KEY
	            (
	             ZIPF_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ZIPF_MMOD_ID ON ZIPF
	(
	  ZIPF_MMOD_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZIPF_ZITR_ID ON ZIPF
	(
	  ZIPF_ZITR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZIPH  */
CREATE TABLE ZIPH (
	 ZIPH_ID	NUMBER(30)	NOT NULL
	,ZIPH_ZIPT_ID	NUMBER(30)	NOT NULL
	,ZIPH_MMOD_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZIPH ADD (
	CONSTRAINT ZIPH_PK
	PRIMARY KEY
	            (
	             ZIPH_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ZIPH_MMOD_ID ON ZIPH
	(
	  ZIPH_MMOD_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZIPH_ZIPT_ID ON ZIPH
	(
	  ZIPH_ZIPT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZIPT  */
CREATE TABLE ZIPT (
	 ZIPT_ID	NUMBER(30)	NOT NULL
	,ZIPT_TABLENAME	VARCHAR2(4)	NOT NULL
	,ZIPT_TABLEID	NUMBER(30)	NOT NULL
	,ZIPT_TYPE	NUMBER(1)	NOT NULL
	,ZIPT_TIME	DATE	NOT NULL
	,ZIPT_MOVETIME	DATE	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZIPT ADD (
	CONSTRAINT ZIPT_PK
	PRIMARY KEY
	            (
	             ZIPT_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  ZITF  */
CREATE TABLE ZITF (
	 ZITF_ID	NUMBER(30)	NOT NULL
	,ZITF_TABLENAME	VARCHAR2(4)	NOT NULL
	,ZITF_FIELDNAME	VARCHAR2(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZITF ADD (
	CONSTRAINT ZITF_PK
	PRIMARY KEY
	            (
	             ZITF_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  ZITR  */
CREATE TABLE ZITR (
	 ZITR_ID	NUMBER(30)	NOT NULL
	,ZITR_TABLENAME	VARCHAR2(4)	NOT NULL
	,ZITR_TABLEID	NUMBER(30)	NOT NULL
	,ZITR_TYPE	NUMBER(1)	NOT NULL
	,ZITR_TIME	DATE	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZITR ADD (
	CONSTRAINT ZITR_PK
	PRIMARY KEY
	            (
	             ZITR_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  ZITS  */
CREATE TABLE ZITS (
	 ZITS_ID	NUMBER(30)	NOT NULL
	,ZITS_MMOD_ID	NUMBER(30)	NOT NULL
	,ZITS_TABLENAME	VARCHAR2(4)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZITS ADD (
	CONSTRAINT ZITS_PK
	PRIMARY KEY
	            (
	             ZITS_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ZITS_MMOD_ID ON ZITS
	(
	  ZITS_MMOD_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZRCC  */
CREATE TABLE ZRCC (
	 ZRCC_ID	NUMBER(30)	NOT NULL
	,ZRCC_FREENIGHTS	NUMBER(4)	NOT NULL
	,ZRCC_FREEADULTS	NUMBER(2)	    NULL
	,ZRCC_PRICE	NUMBER(30,4)	    NULL
	,ZRCC_PRICE_ZDCO_ID	NUMBER(30,4)	    NULL
	,ZRCC_LENGTHOFVALIDITY	NUMBER(4)	NOT NULL
	,ZRCC_VALIDITYTYPE	NUMBER(1)	NOT NULL
	,ZRCC_ZFAG_ID	NUMBER(30)	NOT NULL
	,ZRCC_TRANSFERABLE	NUMBER(1)	NOT NULL
	,ZRCC_ACCOUNTCLOSERHYTHM	NUMBER(1)	NOT NULL
	,ZRCC_ACCOUNTCLOSENUMBER	NUMBER(1)	NOT NULL
	,ZRCC_PAYMENT_ZDCO_ID	NUMBER(30)	    NULL
	,ZRCC_ZCRL_ID	NUMBER(30)	    NULL
	,ZRCC_CREDITLIMIT	NUMBER(30,4)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZRCC ADD (
	CONSTRAINT ZRCC_PK
	PRIMARY KEY
	            (
	             ZRCC_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ZRCC_PAYMENT_ZDCO_ID ON ZRCC
	(
	  ZRCC_PAYMENT_ZDCO_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZRCC_PRICE_ZDCO_ID ON ZRCC
	(
	  ZRCC_PRICE_ZDCO_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZRCC_ZCRL_ID ON ZRCC
	(
	  ZRCC_ZCRL_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZRCC_ZFAG_ID ON ZRCC
	(
	  ZRCC_ZFAG_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZRCR  */
CREATE TABLE ZRCR (
	 ZRCR_ID	NUMBER(30)	NOT NULL
	,ZRCR_XMTY_ID	NUMBER(30)	NOT NULL
	,ZRCR_ZDCO_ID	NUMBER(30)	NOT NULL
	,ZRCR_REBATE	NUMBER(7,4)	NOT NULL
	,ZRCR_REBATETOGETHER	NUMBER(7,4)	NOT NULL
	,ZRCR_MAXNOOFREBATE	NUMBER(3)	NOT NULL
	,ZRCR_REBATE_ZDCO_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZRCR ADD (
	CONSTRAINT ZRCR_PK
	PRIMARY KEY
	            (
	             ZRCR_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ZRCR_REBATE_ZDCO_ID ON ZRCR
	(
	  ZRCR_REBATE_ZDCO_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZRCR_XMTY_ID ON ZRCR
	(
	  ZRCR_XMTY_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZRCR_ZDCO_ID ON ZRCR
	(
	  ZRCR_ZDCO_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZRLZ  */
CREATE TABLE ZRLZ (
	 ZRLZ_ID	NUMBER(30)	NOT NULL
	,ZRLZ_ZPOS_ID	NUMBER(30)	NOT NULL
	,ZRLZ_ZRZC_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZRLZ ADD (
	CONSTRAINT ZRLZ_PK
	PRIMARY KEY
	            (
	             ZRLZ_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ZRLZ_ZPOS_ID ON ZRLZ
	(
	  ZRLZ_ZPOS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZRLZ_ZRZC_ID ON ZRLZ
	(
	  ZRLZ_ZRZC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZRZC  */
CREATE TABLE ZRZC (
	 ZRZC_ID	NUMBER(30)	NOT NULL
	,ZRZC_ZRCR_ID	NUMBER(30)	NOT NULL
	,ZRZC_AUTOMATIC_COUNTER	NUMBER(5)	NOT NULL
	,ZRZC_MANUAL_COUNTER	NUMBER(5)	NOT NULL
	,ZRZC_XMNR_ID	NUMBER(30)	NOT NULL
	,ZRZC_XCMS_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZRZC ADD (
	CONSTRAINT ZRZC_PK
	PRIMARY KEY
	            (
	             ZRZC_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ZRZC_XCMS_ID ON ZRZC
	(
	  ZRZC_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZRZC_XMNR_ID ON ZRZC
	(
	  ZRZC_XMNR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZRZC_ZRCR_ID ON ZRZC
	(
	  ZRZC_ZRCR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZTRI  */
CREATE TABLE ZTRI (
	 ZTRI_ID	NUMBER(30)	NOT NULL
	,ZTRI_ZTRA_ID	NUMBER(30)	NOT NULL
	,ZTRI_TIME	DATE	NOT NULL
	,ZTRI_XCED_ID	NUMBER(30)	NOT NULL
	,ZTRI_REASON	VARCHAR2(2000)	    NULL
	,ZTRI_VALIDINVALID	NUMBER(1)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZTRI ADD (
	CONSTRAINT ZTRI_PK
	PRIMARY KEY
	            (
	             ZTRI_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ZTRI_XCED_ID ON ZTRI
	(
	  ZTRI_XCED_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZTRI_ZTRA_ID ON ZTRI
	(
	  ZTRI_ZTRA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZTXX  */
CREATE TABLE ZTXX (
	 ZTXX_ID	NUMBER(30)	NOT NULL
	,ZTXX_SHORTDESC	VARCHAR2(10)	NOT NULL
	,ZTXX_LONGDESC	VARCHAR2(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZTXX ADD (
	CONSTRAINT ZTXX_PK
	PRIMARY KEY
	            (
	             ZTXX_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  ZUDD  */
CREATE TABLE ZUDD (
	 ZUDD_ID	NUMBER(30)	NOT NULL
	,ZUDD_DESCRIPTION	VARCHAR2(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 40K
	NEXT 40K
	MINEXTENTS 1
	MAXEXTENTS 505
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZUDD ADD (
	CONSTRAINT ZUDD_PK
	PRIMARY KEY
	            (
	             ZUDD_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

CREATE TABLE WPSF (
	WPSF_ID NUMBER(30,0) NOT NULL,
	WPSF_WPSS_ID NUMBER(30,0) NOT NULL,
	WPSF_FIELDNAME VARCHAR2(60) NOT NULL,
	WPSF_VALUE VARCHAR2(200) NOT NULL,
	WPSF_SIMILARITYPERCENTAGE NUMBER(3,0) NOT NULL,
	WPSF_POINT NUMBER(5,0) NOT NULL, CONSTRAINT WPSF_PK PRIMARY KEY (WPSF_ID) USING INDEX TABLESPACE V8INDEX  ) TABLESPACE V8MAIN ; 

CREATE TABLE ZIXC (
	ZIXC_ID NUMBER(30,0) NOT NULL,
	ZIXC_ZDCO_ID NUMBER(30,0) NOT NULL,
	ZIXC_ZCUR_ID NUMBER(30,0) NOT NULL, CONSTRAINT ZIXC_PK PRIMARY KEY (ZIXC_ID) USING INDEX TABLESPACE V8INDEX  ) TABLESPACE V8CONF ; 

CREATE TABLE YFRE (
	YFRE_ID NUMBER(30,0) NOT NULL,
	YFRE_WPHS_ID NUMBER(30,0) NOT NULL,
	YFRE_UPLOADTIME DATE NOT NULL,
	YFRE_ARRIVAL DATE NOT NULL,
	YFRE_DEPARTURE DATE NOT NULL,
	YFRE_XCMS_GLOBALID NUMBER(30) not null,
	YFRE_ROOMTYPE VARCHAR2(10) NULL,
	YFRE_ROOM VARCHAR2(10) NULL,
	YFRE_DAYPRICE NUMBER(30,4) NOT NULL,
	YFRE_TOTALSTAYPRICE NUMBER(30,4) NOT NULL,
	YFRE_NOOFROOMS NUMBER(3,0) NOT NULL,
	YFRE_NOOFADULTS NUMBER(3,0) NOT NULL,
	YFRE_NOOFCHILDREN NUMBER(3,0) NOT NULL,
	YFRE_CREATIONTIME DATE NOT NULL,
	YFRE_LASTMODTIME DATE NOT NULL, CONSTRAINT YFRE_PK PRIMARY KEY (YFRE_ID) USING INDEX TABLESPACE V8INDEX  ) TABLESPACE V8MAIN ; 

CREATE TABLE WLUS (
	WLUS_ID NUMBER(30,0) NOT NULL,
	WLUS_WUSR_XCMS_ID NUMBER(30,0) NULL,
	WLUS_XCMS_ID NUMBER(30,0) NULL,
	WLUS_NAME VARCHAR2(100) NOT NULL,
	WLUS_VALUE NUMBER(1,0) NOT NULL, CONSTRAINT WLUS_PK PRIMARY KEY (WLUS_ID) USING INDEX TABLESPACE V8INDEX  ) TABLESPACE V8MAIN ; 

CREATE TABLE ZDMP (
	ZDMP_ID NUMBER(30,0) NOT NULL,
	ZDMP_ZDCO_ID NUMBER(30,0) NOT NULL,
	ZDMP_TO_POSTICKETTYPE NUMBER(30,0) NOT NULL, CONSTRAINT ZDMP_PK PRIMARY KEY (ZDMP_ID) USING INDEX TABLESPACE V8INDEX  ) TABLESPACE V8CONF ; 

CREATE TABLE SMRT
(
  SMRT_ID                       NUMBER(30)      NOT NULL,
  SMRT_DATE                     DATE            NOT NULL,
  SMRT_YCAT_ID                  NUMBER(30)      NOT NULL,
  SMRT_ADULTS_D                 NUMBER(5),
  SMRT_ADULTS_M                 NUMBER(5),
  SMRT_ADULTS_Y                 NUMBER(7),
  SMRT_CHILDS_D                 NUMBER(5),
  SMRT_CHILDS_M                 NUMBER(5),
  SMRT_CHILDS_Y                 NUMBER(7),
  SMRT_ROOMS_OCC_D              NUMBER(5),
  SMRT_ROOMS_OCC_M              NUMBER(5),
  SMRT_ROOMS_OCC_Y              NUMBER(7),
  SMRT_ROOMSINHOTEL_D           NUMBER(5),
  SMRT_ROOMSINHOTEL_M           NUMBER(5),
  SMRT_ROOMSINHOTEL_Y           NUMBER(7),
  SMRT_ROOMS_OOO_D              NUMBER(5),
  SMRT_ROOMS_OOO_M              NUMBER(5),
  SMRT_ROOMS_OOO_Y              NUMBER(7),
  SMRT_WALKIN_D                 NUMBER(5),
  SMRT_WALKIN_M                 NUMBER(5),
  SMRT_WALKIN_Y                 NUMBER(7),
  SMRT_ARR_ROOMS_D              NUMBER(5),
  SMRT_ARR_ROOMS_M              NUMBER(5),
  SMRT_ARR_ROOMS_Y              NUMBER(7),
  SMRT_DEP_ROOMS_D              NUMBER(5),
  SMRT_DEP_ROOMS_M              NUMBER(5),
  SMRT_DEP_ROOMS_Y              NUMBER(7),
  SMRT_ARR_ADULTS_D             NUMBER(5),
  SMRT_ARR_ADULTS_M             NUMBER(5),
  SMRT_ARR_ADULTS_Y             NUMBER(7),
  SMRT_ARR_CHILDS_D             NUMBER(5),
  SMRT_ARR_CHILDS_M             NUMBER(5),
  SMRT_ARR_CHILDS_Y             NUMBER(7),
  SMRT_DEP_ADULTS_D             NUMBER(5),
  SMRT_DEP_ADULTS_M             NUMBER(5),
  SMRT_DEP_ADULTS_Y             NUMBER(7),
  SMRT_DEP_CHILDS_D             NUMBER(5),
  SMRT_DEP_CHILDS_M             NUMBER(5),
  SMRT_DEP_CHILDS_Y             NUMBER(7),
  SMRT_TOTALGROSSREV_D          NUMBER(30,4),
  SMRT_TOTALGROSSREV_M          NUMBER(30,4),
  SMRT_TOTALGROSSREV_Y          NUMBER(30,4),
  SMRT_TOTALNETREV_D            NUMBER(30,4),
  SMRT_TOTALNETREV_M            NUMBER(30,4),
  SMRT_TOTALNETREV_Y            NUMBER(30,4),
  SMRT_COMPROOMS_D              NUMBER(5),
  SMRT_COMPROOMS_M              NUMBER(5),
  SMRT_COMPROOMS_Y              NUMBER(7),
  SMRT_HOUSEUSEROOMS_D          NUMBER(5),
  SMRT_HOUSEUSEROOMS_M          NUMBER(5),
  SMRT_HOUSEUSEROOMS_Y          NUMBER(7),
  SMRT_BEDSINHOTEL_D            NUMBER(5),
  SMRT_BEDSINHOTEL_M            NUMBER(5),
  SMRT_BEDSINHOTEL_Y            NUMBER(7),
  SMRT_REPEATGUESTARRROOM_D     NUMBER(5),
  SMRT_REPEATGUESTARRROOM_M     NUMBER(5),
  SMRT_REPEATGUESTARRROOM_Y     NUMBER(7),
  SMRT_RESMADETODAY_D           NUMBER(5),
  SMRT_RESMADETODAY_M           NUMBER(5),
  SMRT_RESMADETODAY_Y           NUMBER(7),
  SMRT_RESCANCELEDTODAY_D       NUMBER(5),
  SMRT_RESCANCELEDTODAY_M       NUMBER(5),
  SMRT_RESCANCELEDTODAY_Y       NUMBER(7),
  SMRT_ARRADULTSTOMORROW_D      NUMBER(5),
  SMRT_DEPADULTSTOMORROW_D      NUMBER(5),
  SMRT_ARRROOMSTOMORROW_D       NUMBER(5),
  SMRT_DEPROOMSTOMORROW_D       NUMBER(5),
  SMRT_COMPANY_ROOMS_D          NUMBER(5),
  SMRT_COMPANY_ROOMS_M          NUMBER(5),
  SMRT_COMPANY_ROOMS_Y          NUMBER(7),
  SMRT_COMPANY_REV_GROSS_D      NUMBER(30,4),
  SMRT_COMPANY_REV_GROSS_M      NUMBER(30,4),
  SMRT_COMPANY_REV_GROSS_Y      NUMBER(30,4),
  SMRT_AGENT_ROOMS_D            NUMBER(5),
  SMRT_AGENT_ROOMS_M            NUMBER(5),
  SMRT_AGENT_ROOMS_Y            NUMBER(7),
  SMRT_AGENT_REV_GROSS_D        NUMBER(30,4),
  SMRT_AGENT_REV_GROSS_M        NUMBER(30,4),
  SMRT_AGENT_REV_GROSS_Y        NUMBER(30,4),
  SMRT_IND_ROOMS_D              NUMBER(5),
  SMRT_IND_ROOMS_M              NUMBER(5),
  SMRT_IND_ROOMS_Y              NUMBER(7),
  SMRT_IND_REV_GROSS_D          NUMBER(30,4),
  SMRT_IND_REV_GROSS_M          NUMBER(30,4),
  SMRT_IND_REV_GROSS_Y          NUMBER(30,4),
  SMRT_VIPADULTS_D              NUMBER(5),
  SMRT_VIPADULTS_M              NUMBER(5),
  SMRT_VIPADULTS_Y              NUMBER(7),
  SMRT_PAYMENTS_D               NUMBER(30,4),
  SMRT_PAYMENTS_M               NUMBER(30,4),
  SMRT_PAYMENTS_Y               NUMBER(30,4),
  SMRT_ROOMREVGROSS_D           NUMBER(30,4),
  SMRT_ROOMREVGROSS_M           NUMBER(30,4),
  SMRT_ROOMREVGROSS_Y           NUMBER(30,4),
  SMRT_ROOMREVNET_D             NUMBER(30,4),
  SMRT_ROOMREVNET_M             NUMBER(30,4),
  SMRT_ROOMREVNET_Y             NUMBER(30,4),
  SMRT_CANCFORTODAY_D           NUMBER(5),
  SMRT_CANCFORTODAY_M           NUMBER(5),
  SMRT_CANCFORTODAY_Y           NUMBER(7),
  SMRT_DEPNOTPAID_D             NUMBER(5),
  SMRT_DEPNOTPAID_M             NUMBER(5),
  SMRT_DEPNOTPAID_Y             NUMBER(7),
  SMRT_NOSHOWROOMS_D            NUMBER(5),
  SMRT_NOSHOWROOMS_M            NUMBER(5),
  SMRT_NOSHOWROOMS_Y            NUMBER(7),
  SMRT_DAYUSEROOMS_D            NUMBER(5),
  SMRT_DAYUSEROOMS_M            NUMBER(5),
  SMRT_DAYUSEROOMS_Y            NUMBER(7),
  SMRT_MAXBEDSINHOTEL_D         NUMBER(5),
  SMRT_MAXBEDSINHOTEL_M         NUMBER(5),
  SMRT_MAXBEDSINHOTEL_Y         NUMBER(7),
  SMRT_TOTALGROSSNHTLREV_D      NUMBER(30,4),
  SMRT_TOTALGROSSNHTLREV_M      NUMBER(30,4),
  SMRT_TOTALGROSSNHTLREV_Y      NUMBER(30,4),
  SMRT_TOTALNETNHTLREV_D        NUMBER(30,4),
  SMRT_TOTALNETNHTLREV_M        NUMBER(30,4),
  SMRT_TOTALNETNHTLREV_Y        NUMBER(30,4),
  SMRT_COMPANY_NHTLREV_GROSS_D  NUMBER(30,4),
  SMRT_COMPANY_NHTLREV_GROSS_M  NUMBER(30,4),
  SMRT_COMPANY_NHTLREV_GROSS_Y  NUMBER(30,4),
  SMRT_AGENT_NHTLREV_GROSS_D    NUMBER(30,4),
  SMRT_AGENT_NHTLREV_GROSS_M    NUMBER(30,4),
  SMRT_AGENT_NHTLREV_GROSS_Y    NUMBER(30,4),
  SMRT_IND_NHTLREV_GROSS_D      NUMBER(30,4),
  SMRT_IND_NHTLREV_GROSS_M      NUMBER(30,4),
  SMRT_IND_NHTLREV_GROSS_Y      NUMBER(30,4),
  SMRT_ROOMNHTLREVGROSS_D       NUMBER(30,4),
  SMRT_ROOMNHTLREVGROSS_M       NUMBER(30,4),
  SMRT_ROOMNHTLREVGROSS_Y       NUMBER(30,4),
  SMRT_ROOMNHTLREVNET_D         NUMBER(30,4),
  SMRT_ROOMNHTLREVNET_M         NUMBER(30,4),
  SMRT_ROOMNHTLREVNET_Y         NUMBER(30,4),
  SMRT_FBREVGROSS_D             NUMBER(30,4),
  SMRT_FBREVGROSS_M             NUMBER(30,4),
  SMRT_FBREVGROSS_Y             NUMBER(30,4),
  SMRT_FBNHTLREVGROSS_D         NUMBER(30,4),
  SMRT_FBNHTLREVGROSS_M         NUMBER(30,4),
  SMRT_FBNHTLREVGROSS_Y         NUMBER(30,4),
  SMRT_FBREVNET_D               NUMBER(30,4),
  SMRT_FBREVNET_M               NUMBER(30,4),
  SMRT_FBREVNET_Y               NUMBER(30,4),
  SMRT_FBNHTLREVNET_D           NUMBER(30,4),
  SMRT_FBNHTLREVNET_M           NUMBER(30,4),
  SMRT_FBNHTLREVNET_Y           NUMBER(30,4),
  SMRT_OCCTOMORROW              NUMBER(30,4),
  SMRT_OCCNEXTSEVENDAYS         NUMBER(30,4),
  SMRT_OCCUNTILENDMONTH         NUMBER(30,4),
  SMRT_OCCENDYEAR               NUMBER(30,4),
  SMRT_OCCNEXTFOURWEEKS         NUMBER(30,4),
  SMRT_SOURCE_ROOMS_D           NUMBER(5),
  SMRT_SOURCE_ROOMS_M           NUMBER(5),
  SMRT_SOURCE_ROOMS_Y           NUMBER(7),
  SMRT_SOURCE_REV_GROSS_D       NUMBER(30,4),
  SMRT_SOURCE_REV_GROSS_M       NUMBER(30,4),
  SMRT_SOURCE_REV_GROSS_Y       NUMBER(30,4),
  SMRT_BOOKER_ROOMS_D           NUMBER(5),
  SMRT_BOOKER_ROOMS_M           NUMBER(5),
  SMRT_BOOKER_ROOMS_Y           NUMBER(7),
  SMRT_BOOKER_REV_GROSS_D       NUMBER(30,4),
  SMRT_BOOKER_REV_GROSS_M       NUMBER(30,4),
  SMRT_BOOKER_REV_GROSS_Y       NUMBER(30,4),
  SMRT_VENDOR_ROOMS_D           NUMBER(5),
  SMRT_VENDOR_ROOMS_M           NUMBER(5),
  SMRT_VENDOR_ROOMS_Y           NUMBER(7),
  SMRT_VENDOR_REV_GROSS_D       NUMBER(30,4),
  SMRT_VENDOR_REV_GROSS_M       NUMBER(30,4),
  SMRT_VENDOR_REV_GROSS_Y       NUMBER(30,4),
  SMRT_MPLANER_ROOMS_D          NUMBER(5),
  SMRT_MPLANER_ROOMS_M          NUMBER(5),
  SMRT_MPLANER_ROOMS_Y          NUMBER(7),
  SMRT_MPLANER_REV_GROSS_D      NUMBER(30,4),
  SMRT_MPLANER_REV_GROSS_M      NUMBER(30,4),
  SMRT_MPLANER_REV_GROSS_Y      NUMBER(30,4),
  SMRT_SOURCE_NHTLREV_GROSS_D   NUMBER(30,4),
  SMRT_SOURCE_NHTLREV_GROSS_M   NUMBER(30,4),
  SMRT_SOURCE_NHTLREV_GROSS_Y   NUMBER(30,4),
  SMRT_BOOKER_NHTLREV_GROSS_D   NUMBER(30,4),
  SMRT_BOOKER_NHTLREV_GROSS_M   NUMBER(30,4),
  SMRT_BOOKER_NHTLREV_GROSS_Y   NUMBER(30,4),
  SMRT_VENDOR_NHTLREV_GROSS_D   NUMBER(30,4),
  SMRT_VENDOR_NHTLREV_GROSS_M   NUMBER(30,4),
  SMRT_VENDOR_NHTLREV_GROSS_Y   NUMBER(30,4),
  SMRT_MPLANER_NHTLREV_GROSS_D  NUMBER(30,4),
  SMRT_MPLANER_NHTLREV_GROSS_M  NUMBER(30,4),
  SMRT_MPLANER_NHTLREV_GROSS_Y  NUMBER(30,4),
  SMRT_MINIREVGROSS_D           NUMBER(30,4),
  SMRT_MININHTLREVGROSS_D       NUMBER(30,4),
  SMRT_TELEREVGROSS_D           NUMBER(30,4),
  SMRT_TELENHTLREVGROSS_D       NUMBER(30,4),
  SMRT_MISCREVGROSS_D           NUMBER(30,4),
  SMRT_MISCNHTLREVGROSS_D       NUMBER(30,4),
  SMRT_NOSTATREVGROSS_D         NUMBER(30,4),
  SMRT_NOSTATNHTLREVGROSS_D     NUMBER(30,4),
  SMRT_MINIREVGROSS_M           NUMBER(30,4),
  SMRT_MININHTLREVGROSS_M       NUMBER(30,4),
  SMRT_TELEREVGROSS_M           NUMBER(30,4),
  SMRT_TELENHTLREVGROSS_M       NUMBER(30,4),
  SMRT_MISCREVGROSS_M           NUMBER(30,4),
  SMRT_MISCNHTLREVGROSS_M       NUMBER(30,4),
  SMRT_NOSTATREVGROSS_M         NUMBER(30,4),
  SMRT_NOSTATNHTLREVGROSS_M     NUMBER(30,4),
  SMRT_MINIREVGROSS_Y           NUMBER(30,4),
  SMRT_MININHTLREVGROSS_Y       NUMBER(30,4),
  SMRT_TELEREVGROSS_Y           NUMBER(30,4),
  SMRT_TELENHTLREVGROSS_Y       NUMBER(30,4),
  SMRT_MISCREVGROSS_Y           NUMBER(30,4),
  SMRT_MISCNHTLREVGROSS_Y       NUMBER(30,4),
  SMRT_NOSTATREVGROSS_Y         NUMBER(30,4),
  SMRT_NOSTATNHTLREVGROSS_Y     NUMBER(30,4),
  SMRT_MINIREVNET_D             NUMBER(30,4),
  SMRT_MININHTLREVNET_D         NUMBER(30,4),
  SMRT_TELEREVNET_D             NUMBER(30,4),
  SMRT_TELENHTLREVNET_D         NUMBER(30,4),
  SMRT_MISCREVNET_D             NUMBER(30,4),
  SMRT_MISCNHTLREVNET_D         NUMBER(30,4),
  SMRT_NOSTATREVNET_D           NUMBER(30,4),
  SMRT_NOSTATNHTLREVNET_D       NUMBER(30,4),
  SMRT_MINIREVNET_M             NUMBER(30,4),
  SMRT_MININHTLREVNET_M         NUMBER(30,4),
  SMRT_TELEREVNET_M             NUMBER(30,4),
  SMRT_TELENHTLREVNET_M         NUMBER(30,4),
  SMRT_MISCREVNET_M             NUMBER(30,4),
  SMRT_MISCNHTLREVNET_M         NUMBER(30,4),
  SMRT_NOSTATREVNET_M           NUMBER(30,4),
  SMRT_NOSTATNHTLREVNET_M       NUMBER(30,4),
  SMRT_MINIREVNET_Y             NUMBER(30,4),
  SMRT_MININHTLREVNET_Y         NUMBER(30,4),
  SMRT_TELEREVNET_Y             NUMBER(30,4),
  SMRT_TELENHTLREVNET_Y         NUMBER(30,4),
  SMRT_MISCREVNET_Y             NUMBER(30,4),
  SMRT_MISCNHTLREVNET_Y         NUMBER(30,4),
  SMRT_NOSTATREVNET_Y           NUMBER(30,4),
  SMRT_NOSTATNHTLREVNET_Y       NUMBER(30,4),
  SMRT_WALKEDFORTODAY_D         NUMBER(5),
  SMRT_WALKEDFORTODAY_M         NUMBER(6),
  SMRT_WALKEDFORTODAY_Y         NUMBER(7),
  SMRT_RESWALKEDTODAY_D         NUMBER(5),
  SMRT_RESWALKEDTODAY_M         NUMBER(6),
  SMRT_RESWALKEDTODAY_Y         NUMBER(7),
  SMRT_DOMESTICCHILDS_D         NUMBER(5),
  SMRT_DOMESTICCHILDS_M         NUMBER(5),
  SMRT_DOMESTICCHILDS_Y         NUMBER(5),
  SMRT_ARR_DOMESTICCHILDS_D     NUMBER(5),
  SMRT_ARR_DOMESTICCHILDS_M     NUMBER(5),
  SMRT_ARR_DOMESTICCHILDS_Y     NUMBER(5),
  SMRT_DEP_DOMESTICCHILDS_D     NUMBER(5),
  SMRT_DEP_DOMESTICCHILDS_M     NUMBER(5),
  SMRT_DEP_DOMESTICCHILDS_Y     NUMBER(5),
  SMRT_OCCNEXTFOURWEEKS_D       NUMBER(30,4),
  SMRT_OCCTOMORROW_D            NUMBER(30,4),
  SMRT_OCCNEXTSEVENDAYS_D       NUMBER(30,4),
  SMRT_OCCUNTILENDMONTH_D       NUMBER(30,4),
  SMRT_OCCENDYEAR_D             NUMBER(30,4),
  SMRT_OCCNEXTFOURWEEKS_T       NUMBER(30,4),
  SMRT_OCCTOMORROW_T            NUMBER(30,4),
  SMRT_OCCNEXTSEVENDAYS_T       NUMBER(30,4),
  SMRT_OCCUNTILENDMONTH_T       NUMBER(30,4),
  SMRT_OCCENDYEAR_T             NUMBER(30,4),
  SMRT_DAYCOUNT                 NUMBER(5),
  SMRT_PARTNER_ID               NUMBER(30),
  SMRT_IMPORTED                 NUMBER(1),
  SMRT_WPHS_ID                  NUMBER(30),
  SMRT_ROOMS_OOS_D              NUMBER(5),
  SMRT_ROOMS_OOS_M              NUMBER(5),
  SMRT_ROOMS_OOS_Y              NUMBER(7),
  SMRT_ROOMS_OCC_DFS_D          NUMBER(5),
  SMRT_ROOMS_OCC_DFS_M          NUMBER(5),
  SMRT_ROOMS_OCC_DFS_Y          NUMBER(7),
  SMRT_COMP_ADULTS_D            NUMBER(5),
  SMRT_COMP_ADULTS_M            NUMBER(5),
  SMRT_COMP_ADULTS_Y            NUMBER(7),
  SMRT_COMP_CHILDS_D            NUMBER(5),
  SMRT_COMP_CHILDS_M            NUMBER(5),
  SMRT_COMP_CHILDS_Y            NUMBER(7),
  CONSTRAINT SMRT_PK PRIMARY KEY (SMRT_ID) USING INDEX TABLESPACE V8INDEX
)
TABLESPACE V8MAIN
PCTUSED    40
PCTFREE    10
INITRANS   1
MAXTRANS   255
STORAGE    (
            INITIAL          40K
            NEXT             40K
            MINEXTENTS       1
            MAXEXTENTS       505
            PCTINCREASE      50
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOLOGGING
NOCACHE
NOPARALLEL;

CREATE TABLE WEAS
(
  WEAS_ID NUMBER(30) NOT NULL,
  WEAS_DESCRIPTION VARCHAR2(30) NOT NULL,
  WEAS_DISPLORDER NUMBER(3) NOT NULL,
  WEAS_WRPB_ID NUMBER(30) NOT NULL,
  WEAS_DEFAULT Number(1),
  CONSTRAINT WEAS_PK PRIMARY KEY (WEAS_ID) USING INDEX TABLESPACE V8INDEX 
) TABLESPACE V8CONF;

CREATE TABLE WMSO (
	WMSO_ID NUMBER(30,0) NOT NULL,
	WMSO_WQFD_ID NUMBER(30,0) NOT NULL,
	WMSO_CREATIONDATE DATE NULL,
	WMSO_DESCRIPTION VARCHAR2(60) NULL,
	WMSO_WLOF_ID NUMBER(30,0) NULL,
	WMSO_DICS NUMBER(1,0) NULL,
	WMSO_DIWL NUMBER(1,0) NULL,
	WMSO_DCCS NUMBER(1,0) NULL,
	WMSO_CPI NUMBER(1,0) NULL,
	WMSO_CPC NUMBER(1,0) NULL,
	WMSO_DMC NUMBER(1,0) NULL,
	WMSO_DPC NUMBER(1,0) NULL,
	WMSO_DOC NUMBER(1,0) NULL,
	WMSO_EFM NUMBER(1,0) NULL,
	WMSO_AC NUMBER(1,0) NULL,
	WMSO_EC NUMBER(1,0) NULL, CONSTRAINT WMSO_PK PRIMARY KEY (WMSO_ID) USING INDEX TABLESPACE V8INDEX  ) TABLESPACE V8MAIN ; 


/************************************************************************************************************************
*
*  The following statements will upgrade the COMMON tables
*
************************************************************************************************************************/


ALTER TABLE AINV ADD ( AINV_MANUALPOST NUMBER(1) NULL  );

ALTER TABLE AINV ADD ( AINV_REALPOSTDATE DATE NULL  );

ALTER TABLE ARLG ADD ( ARLG_DOCTYPE NUMBER(1) NULL  );

ALTER TABLE SHIS ADD ( SHIS_WPHS_ID NUMBER(30) NULL  );

ALTER TABLE SHIS ADD ( SHIS_PARTNER_ID NUMBER(30) NULL  );

ALTER TABLE SHIS ADD ( SHIS_IMPORTED NUMBER(1) NULL  );

ALTER TABLE SMAN ADD ( SMAN_PARTNER_ID NUMBER(30) NULL  );

ALTER TABLE SMAN ADD ( SMAN_IMPORTED NUMBER(1) NULL  );

ALTER TABLE SMAN ADD ( SMAN_WPHS_ID NUMBER(30) NULL  );

ALTER TABLE SMBD ADD ( SMBD_OCCTOMORROW_D NUMBER(30,4) NULL  );

ALTER TABLE SMBD ADD ( SMBD_OCCTOMORROW_T NUMBER(30,4) NULL  );

ALTER TABLE SMBD ADD ( SMBD_OCCNEXTSEVENDAYS_D NUMBER(30,4) NULL  );

ALTER TABLE SMBD ADD ( SMBD_OCCNEXTSEVENDAYS_T NUMBER(30,4) NULL  );

ALTER TABLE SMBD ADD ( SMBD_OCCUNTILENDMONTH_D NUMBER(30,4) NULL  );

ALTER TABLE SMBD ADD ( SMBD_OCCUNTILENDMONTH_T NUMBER(30,4) NULL  );

ALTER TABLE SMBD ADD ( SMBD_OCCENDYEAR_D NUMBER(30,4) NULL  );

ALTER TABLE SMBD ADD ( SMBD_OCCENDYEAR_T NUMBER(30,4) NULL  );

ALTER TABLE SMBD ADD ( SMBD_OCCNEXTFOURWEEKS_D NUMBER(30,4) NULL  );

ALTER TABLE SMBD ADD ( SMBD_OCCNEXTFOURWEEKS_T NUMBER(30,4) NULL  );

ALTER TABLE SRPD ADD ( SRPD_PARTNER_ID NUMBER(30) NULL  );

ALTER TABLE SRPD ADD ( SRPD_IMPORTED NUMBER(1) NULL  );

ALTER TABLE SRPD ADD ( SRPD_WPHS_ID NUMBER(30) NULL  );

ALTER TABLE WACT ADD ( WACT_WPHS_ID NUMBER(30) NULL  );

ALTER TABLE WACT ADD ( WACT_PLACE_TYPE NUMBER(1) NULL  );

ALTER TABLE WACT ADD ( WACT_PLACE_ID NUMBER(30) NULL  );

ALTER TABLE WGBS ADD ( WGBS_NIGHTAUDIT NUMBER(1) NULL  );

ALTER TABLE WPPP MODIFY ( WPPP_PRINTER VARCHAR2(120)  );

ALTER TABLE WPSS ADD ( WPSS_TYPE NUMBER(1) DEFAULT 0 NOT NULL  );

ALTER TABLE WRPP ADD ( WRPP_MANDATORY NUMBER(1) NULL  );

ALTER TABLE WVNP ADD ( WVNP_ALLOW_PERMANENT NUMBER(1) DEFAULT 1 NULL  );

ALTER TABLE WVNP ADD ( WVNP_PRIORITY_ORDER NUMBER(1) NULL  );

ALTER TABLE XADR ADD ( XADR_GLOBALID NUMBER(30) NULL  );

ALTER TABLE XCMS ADD ( XCMS_GLOBALID NUMBER(30) NULL  );

ALTER TABLE XCMS ADD ( XCMS_CENTRALSYNCTIMESTAMP DATE NULL  );

ALTER TABLE XCMS ADD ( XCMS_CENTRALSYNCTIMELOCAL DATE NULL  );

ALTER TABLE XCMS ADD ( XCMS_LINKEDPROFILESYNCDONE NUMBER(1) NULL  );

ALTER TABLE XCMS ADD ( XCMS_AUTOMERGEERROR DATE NULL  );

ALTER TABLE XCNC ADD ( XCNC_UPLOAD NUMBER(1) NULL  );

ALTER TABLE XCNO ADD ( XCNO_GLOBALID NUMBER(30) NULL  );

ALTER TABLE XCOM ADD ( XCOM_GLOBALID NUMBER(30) NULL  );

ALTER TABLE XMNR ADD ( XMNR_ZTRA_ID NUMBER(30) NULL  );

ALTER TABLE XPAC ADD ( XPAC_SHOWLONGDESC NUMBER(1) NULL  );

ALTER TABLE XPAC ADD ( XPAC_MANDATORYBOOKING NUMBER(1) NULL  );

ALTER TABLE XPAC ADD ( XPAC_MANDATORYEVENT NUMBER(1) NULL  );

ALTER TABLE XPDA ADD ( XPDA_RETURNABLE NUMBER(1) NULL  );

ALTER TABLE YBOM ADD ( YBOM_SERIES_ID NUMBER(30) NULL  );

ALTER TABLE YBST ADD ( YBST_CANCELSTATUS NUMBER(1) NULL  );

ALTER TABLE YCIT ADD ( YCIT_WEBSTATUS NUMBER(1) NULL  );

ALTER TABLE YCMP ADD ( YCMP_XCMS_ID NUMBER(30) NULL  );

ALTER TABLE YDET ADD ( YDET_YFRN_ID NUMBER(30) NULL  );

ALTER TABLE YEBR ADD ( YEBR_DISPLORDER NUMBER(3) NULL  );

ALTER TABLE YEBS ADD ( YEBS_PRIORITY NUMBER(3) DEFAULT 0 NULL  );

ALTER TABLE YEBS ADD ( YEBS_RPDW_ID NUMBER(30) NULL  );

ALTER TABLE YEMD ADD ( YEMD_ZDCO_ID NUMBER(30) NULL  );

ALTER TABLE YEMN ADD ( YEMN_DISPLORDER NUMBER(3) NULL  );

ALTER TABLE YEST ADD ( YEST_WEBSTATUS NUMBER(1) NULL  );

ALTER TABLE YEST ADD ( YEST_WEBNAME VARCHAR2(30) NULL  );

ALTER TABLE YETY ADD ( YETY_WEBSTATUS NUMBER(1) NULL  );

ALTER TABLE YEVM ADD ( YEVM_DOORCARD_PROF VARCHAR2(100) NULL  );

ALTER TABLE YFCA ADD ( YFCA_ZDCO_ID NUMBER(30) NULL  );

ALTER TABLE YFCB ADD ( YFCB_ZDCO_ID NUMBER(30) NULL  );

ALTER TABLE YFMI MODIFY ( YFMI_QUANTITY NUMBER(30,2) NULL  );

ALTER TABLE YFSC ADD ( YFSC_RPDW_ID NUMBER(30) NULL  );

ALTER TABLE YFXC ADD ( YFXC_ZCUR_ID NUMBER(30) NULL  );

ALTER TABLE YGRP ADD ( YGRP_XSTA_ID NUMBER(30) NULL  );

ALTER TABLE YGRT ADD ( YGRT_XSTA_ID NUMBER(30) NULL  );

ALTER TABLE YMRD ADD ( YMRD_ZDCO_ID NUMBER(30) NULL  );

ALTER TABLE YPKG ADD ( YPKG_WEBSTATUS NUMBER(1) NULL  );

ALTER TABLE YPKG ADD ( YPKG_WEBENABLED NUMBER(1) NULL  );

ALTER TABLE YRCH ADD ( YRCH_FLAT NUMBER(1) NULL  );

ALTER TABLE YRCH ADD ( YRCH_INACTIVE NUMBER(1) NULL  );

ALTER TABLE YRES ADD ( YRES_LASTDAYOF_YRES_ID NUMBER(30) NULL  );

ALTER TABLE YSSC ADD ( YSSC_WEBENABLED NUMBER(1) NULL  );

ALTER TABLE YSSC ADD ( YSSC_RPDW_ID NUMBER(30) NULL  );

ALTER TABLE YSSL ADD ( YSSL_RPDW_ID NUMBER(30) NULL  );

ALTER TABLE YTRD ADD ( YTRD_TENTROOMS NUMBER(3) NULL  );

ALTER TABLE ZDCO ADD ( ZDCO_ADJUST_ZDCO_ID NUMBER(30) NULL  );

ALTER TABLE ZDTL ADD ( ZDTL_ZTXX_ID NUMBER(30) NULL  );

ALTER TABLE ZPOS ADD ( ZPOS_ZUDD_ID NUMBER(30) NULL  );

ALTER TABLE ZPOS ADD ( ZPOS_NOREPRINT NUMBER(1) NULL  );

ALTER TABLE ZTRA ADD ( ZTRA_TABLENAME VARCHAR2(4) NULL  );

ALTER TABLE ZTRA ADD ( ZTRA_TABLEID NUMBER(30) NULL  );

ALTER TABLE ZTRA ADD ( ZTRA_INVALID NUMBER(1) NULL  );

ALTER TABLE ZTRA ADD ( ZTRA_ZTRI_ID NUMBER(30) NULL  );

ALTER TABLE ZTXC ADD ( ZTXC_TAX_EXEMPTION NUMBER(1) NULL  );

ALTER TABLE ARPL ADD ( ARPL_SAVEDONLY NUMBER(1) DEFAULT 0 NOT NULL  );

ALTER TABLE ARPL ADD ( ARPL_ORIGINAL_ARPL_ID NUMBER(30) NULL  );

ALTER TABLE ARPL ADD ( ARPL_EDITOR_XCMS_ID NUMBER(30) NULL  );

ALTER TABLE ARPL ADD ( ARPL_EDITOR_DATE DATE NULL  );

ALTER TABLE ARPL ADD ( ARPL_REVISION NUMBER(30) NULL  );

ALTER TABLE ARPL ADD ( ARPL_NOTE VARCHAR(200) NULL  );

ALTER TABLE WLAF MODIFY ( WLAF_PICTURE LONG RAW  );

ALTER TABLE WLAF MODIFY ( WLAF_WHERE NULL  );

ALTER TABLE WLAF MODIFY ( WLAF_FREETEXT VARCHAR2(1000)  );

ALTER TABLE WLFC ADD ( WLFC_FINAL NUMBER(1) NULL  );

ALTER TABLE YBLH ADD ( YBLH_ZFAC_ID NUMBER(30) NULL  );

ALTER TABLE WLAF ADD ( WLAF_NUMBERCYCLE NUMBER(30) NULL  );

ALTER TABLE ZITR ADD ( ZITR_FROMDATE DATE NULL  );

ALTER TABLE ZITR ADD ( ZITR_TODATE DATE NULL  );

ALTER TABLE ZITR MODIFY ( ZITR_TABLEID NULL  );

ALTER TABLE ZIPT ADD ( ZIPT_FROMDATE DATE NULL  );

ALTER TABLE ZIPT ADD ( ZIPT_TODATE DATE NULL  );

ALTER TABLE ZIPT MODIFY ( ZIPT_TABLEID NULL  );

ALTER TABLE YRMS ADD ( YRMS_FREETEXT VARCHAR2(1000) NULL  );

ALTER TABLE YRMS ADD ( YRMS_PICTURE LONG RAW NULL  );

ALTER TABLE YGRT MODIFY ( YGRT_NAME VARCHAR2(60)  );

ALTER TABLE YGRP MODIFY ( YGRP_NAME VARCHAR2(60)  );

ALTER TABLE MMOD ADD ( MMOD_TWOWAY NUMBER(1) NOT NULL  );

ALTER TABLE YRES ADD ( YRES_ZFST_ID NUMBER(30) NULL  );

ALTER TABLE WMAI ADD ( WMAI_ATTACHMENT_RTF_WTXT_ID NUMBER(30) NULL  );

ALTER TABLE XCED ADD ( XCED_FORCE_PW_CHANGE NUMBER(1) NULL  );

ALTER TABLE WPHS ADD ( WPHS_AVAILABILITY NUMBER(1) NULL  );

ALTER TABLE WPHS ADD ( WPHS_DISPLORDER NUMBER(3) NULL  );

ALTER TABLE RPLS ADD ( RPLS_DIM_FONTSIZE FLOAT NULL  );

ALTER TABLE XCAC ADD ( XCAC_WEBENABLED NUMBER(1) NULL  );

ALTER TABLE XCAC MODIFY ( XCAC_WEBENABLED DEFAULT 1  );

ALTER TABLE ZUDD MODIFY ( ZUDD_DESCRIPTION VARCHAR2(60)  );

ALTER TABLE ZWIN ADD ( ZWIN_ZFST_ID NUMBER(30) NULL  );

ALTER TABLE WATY ADD ( WATY_OOO NUMBER(1) NULL  );

ALTER TABLE MCFG ADD ( MCFG_TR_INTERVAL NUMBER(5) NULL  );

ALTER TABLE XCMS ADD ( XCMS_ZTXX_ID NUMBER(30) NULL  );

ALTER TABLE YFRE ADD ( YFRE_YRES_ID NUMBER(30) NOT NULL  );

ALTER TABLE YCAD ADD ( YCAD_INACTIVE NUMBER(1) NULL  );

ALTER TABLE MMOD ADD ( MMOD_RATE_PER_GUEST NUMBER(1) DEFAULT 0 NOT NULL  );

ALTER TABLE WWFQ ADD ( WWFQ_VALUE2 VARCHAR2(300) NULL  );

ALTER TABLE WQFD ADD ( WQFD_FSTA NUMBER(1) NULL  );

ALTER TABLE WQFD ADD ( WQFD_FNIG NUMBER(1) NULL  );

ALTER TABLE WQFD ADD ( WQFD_RIND NUMBER(1) NULL  );

ALTER TABLE XCMS ADD ( XCMS_ORG_WPHS_ID NUMBER(30) NULL  );

ALTER TABLE WSOQ ADD ( WSOQ_WMSO_ID NUMBER(30) NULL  );

ALTER TABLE YRES ADD ( YRES_UPLOADTIME DATE NULL  );


/************************************************************************************************************************
*
*  The following statements will upgrade the indexes for the COMMON tables
*
************************************************************************************************************************/


/*  SHIS  */

CREATE BITMAP INDEX SHIS_PARTNER_ID ON SHIS
	(
	  SHIS_PARTNER_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE BITMAP INDEX SHIS_WPHS_ID ON SHIS
	(
	  SHIS_WPHS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  SMAN  */

CREATE INDEX SMAN_PARTNER_ID ON SMAN
	(
	  SMAN_PARTNER_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX SMAN_WPHS_ID ON SMAN
	(
	  SMAN_WPHS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  SRPD  */

CREATE BITMAP INDEX SRPD_PARTNER_ID ON SRPD
	(
	  SRPD_PARTNER_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE BITMAP INDEX SRPD_WPHS_ID ON SRPD
	(
	  SRPD_WPHS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  WACT  */

CREATE INDEX WACT_PLACE_ID ON WACT
	(
	  WACT_PLACE_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX WACT_WPHS_ID ON WACT
	(
	  WACT_WPHS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  XADR  */

CREATE INDEX XADR_GLOBALID ON XADR
	(
	  XADR_GLOBALID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  XCMS  */

CREATE INDEX XCMS_CENTRALSYNCTIMELOCAL ON XCMS
	(
	  XCMS_CENTRALSYNCTIMELOCAL
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XCMS_CENTRALSYNCTIMESTAMP ON XCMS
	(
	  XCMS_CENTRALSYNCTIMESTAMP
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XCMS_GLOBALID ON XCMS
	(
	  XCMS_GLOBALID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  XCNO  */

CREATE INDEX XCNO_GLOBALID ON XCNO
	(
	  XCNO_GLOBALID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  XCOM  */

CREATE INDEX XCOM_GLOBALID ON XCOM
	(
	  XCOM_GLOBALID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  XMNR  */

CREATE INDEX XMNR_ZTRA_ID ON XMNR
	(
	  XMNR_ZTRA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YBOM  */

CREATE INDEX YBOM_SERIES_ID ON YBOM
	(
	  YBOM_SERIES_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YCMP  */

CREATE INDEX YCMP_XCMS_ID ON YCMP
	(
	  YCMP_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YDET  */

CREATE INDEX YDET_YFRN_ID ON YDET
	(
	  YDET_YFRN_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YEBR  */

CREATE INDEX YEBR_DISPLORDER ON YEBR
	(
	  YEBR_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YEBS  */

CREATE INDEX YEBS_RPDW_ID ON YEBS
	(
	  YEBS_RPDW_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YEMD  */

CREATE INDEX YEMD_ZDCO_ID ON YEMD
	(
	  YEMD_ZDCO_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YEMN  */

CREATE INDEX YEMN_DISPLORDER ON YEMN
	(
	  YEMN_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YFCA  */

CREATE INDEX YFCA_ZDCO_ID ON YFCA
	(
	  YFCA_ZDCO_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YFCB  */

CREATE INDEX YFCB_ZDCO_ID ON YFCB
	(
	  YFCB_ZDCO_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YFSC  */

CREATE INDEX YFSC_RPDW_ID ON YFSC
	(
	  YFSC_RPDW_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YFXC  */

CREATE INDEX YFXC_ZCUR_ID ON YFXC
	(
	  YFXC_ZCUR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YGRP  */

CREATE INDEX YGRP_XSTA_ID ON YGRP
	(
	  YGRP_XSTA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YGRT  */

CREATE INDEX YGRT_XSTA_ID ON YGRT
	(
	  YGRT_XSTA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YMRD  */

CREATE INDEX YMRD_ZDCO_ID ON YMRD
	(
	  YMRD_ZDCO_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YPRD  */

CREATE INDEX YPRD_ENDDATE ON YPRD
	(
	  YPRD_ENDDATE
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YPRD_STARTDATE ON YPRD
	(
	  YPRD_STARTDATE
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YRES  */

CREATE INDEX YRES_LASTDAYOF_YRES_ID ON YRES
	(
	  YRES_LASTDAYOF_YRES_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YSSC  */

CREATE INDEX YSSC_RPDW_ID ON YSSC
	(
	  YSSC_RPDW_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YSSL  */

CREATE INDEX YSSL_RPDW_ID ON YSSL
	(
	  YSSL_RPDW_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  ZDCO  */

CREATE INDEX ZDCO_ADJUST_ZDCO_ID ON ZDCO
	(
	  ZDCO_ADJUST_ZDCO_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  ZDTL  */

CREATE INDEX ZDTL_ZTXX_ID ON ZDTL
	(
	  ZDTL_ZTXX_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  ZINB  */

CREATE INDEX ZINB_COMPRESSED ON ZINB
	(
	  ZINB_COMPRESSED
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  ZIPL  */

CREATE INDEX ZIPL_TIME ON ZIPL
	(
	  ZIPL_TIME
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  ZPOS  */

CREATE INDEX ZPOS_ZUDD_ID ON ZPOS
	(
	  ZPOS_ZUDD_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  ZTRA  */

CREATE INDEX ZTRA_ZTRI_ID ON ZTRA
	(
	  ZTRA_ZTRI_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;


CREATE INDEX ARPL_REVISION ON ARPL (ARPL_REVISION) TABLESPACE V8INDEX;


/************************************************************************************************************************
*
*  The following statements will update the data
*
************************************************************************************************************************/


UPDATE ARLG SET ARLG_DOCTYPE = 1 WHERE NVL(ARLG_DOCTYPE, 0) = 0;

UPDATE YDET SET YDET_YFRN_ID = NULL WHERE YDET_YFRN_ID IS NOT NULL AND EXISTS (SELECT * FROM YRES WHERE YRES_ID = YDET_YRES_ID AND YRES_RESSTATUS = 3);

UPDATE YFXC SET YFXC_ZCUR_ID = (SELECT YRES_CONTRACT_ZCUR_ID FROM YRES,YDET WHERE YRES_ID = YDET_YRES_ID AND YDET_ID = YFXC_YDET_ID) WHERE YFXC_ZCUR_ID IS NULL;

TRUNCATE TABLE XMUA;


/************************************************************************************************************************
*
*  The following statements will drop columns that are not used anymore
*
************************************************************************************************************************/


ALTER TABLE YBLD DROP COLUMN YBLD_CUTOFFTIMENOOFROOMS;

ALTER TABLE YBLD DROP COLUMN YBLD_CUTOFFTIMENOOFBEDS;

ALTER TABLE WLFC DROP COLUMN WLFC_LOST_OR_FOUND;

ALTER TABLE YBEF DROP COLUMN YBEF_PER_PERSON_PKG;

ALTER TABLE YBEF DROP COLUMN YBEF_FLAT_AMOUNT_PKG;


--- End of DBDiff for Oracle --- Elapsed Time: 00:43:50 ---
