--THIS FILE IS NEEDED ONLY FOR THE ONLINE UPDATE OR WHEN UPGRADING FROM VERSION 8.7.4.20!!!

/************************************************************************************************************************
*
*
*  Date: May 11, 2009  18:32:02
*
*  This upgrade script was automatically generated by DBDiff for Oracle (www.dbdiff.com)
*
*  SOURCE DATABASE:  VERSION_8_8_0@V8
*  TARGET DATABASE:  VERSION_8_7_4@V8
*
*  This script should be executed as VERSION_8_7_4_19 in database VERSION_8_7_4@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_LMBG INCREMENT BY 1 START WITH 1000 NOMAXVALUE MINVALUE 1 NOCYCLE NOCACHE NOORDER;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


/************************************************************************************************************************
*
*  tables
*
*  798 tables were found in VERSION_8_8_0@V8
*  764 tables were found in VERSION_8_7_4@V8
*
************************************************************************************************************************/




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


DROP TABLE VERSION_8_7_4_19;

DROP TABLE RPSL CASCADE CONSTRAINTS;

DROP TRIGGER XPDC_NULLFIELDS;


/************************************************************************************************************************
*
*  The following statements will drop procedures that DO NOT exist in VERSION_8_8_0@V8
*
************************************************************************************************************************/


DROP PROCEDURE FILLZBAL;


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


/*  LMBG  */
CREATE TABLE LMBG (
	 LMBG_ID	NUMBER(30)	NOT NULL
	,LMBG_SHORTDESC	VARCHAR2(10)	    NULL
	,LMBG_LONGDESC	VARCHAR2(200)	    NULL
	,LMBG_DISPLORDER	NUMBER(3)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE LMBG ADD (
	CONSTRAINT LMBG_PK
	PRIMARY KEY
	            (
	             LMBG_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX LMBG_DISPLORDER ON LMBG
	(
	  LMBG_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  LMGR  */
CREATE TABLE LMGR (
	 LMGR_ID	NUMBER(30)	NOT NULL
	,LMGR_SHORTDESC	VARCHAR2(10)	    NULL
	,LMGR_LONGDESC	VARCHAR2(200)	    NULL
	,LMGR_DISPLORDER	NUMBER(3)	    NULL
	,LMGR_TYPE	NUMBER(1)	    NULL
	,LMGR_IS_MAINPRODUCT	NUMBER(1)	    NULL
	,LMGR_LMBG_ID	NUMBER(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE LMGR ADD (
	CONSTRAINT LMGR_PK
	PRIMARY KEY
	            (
	             LMGR_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX LMGR_DISPLORDER ON LMGR
	(
	  LMGR_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX LMGR_LMBG_ID ON LMGR
	(
	  LMGR_LMBG_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  LPAR  */
CREATE TABLE LPAR (
	 LPAR_ID	NUMBER(30)	NOT NULL
	,LPAR_PARTNUMBER	VARCHAR2(200)	    NULL
	,LPAR_PRODUCTNAME	VARCHAR2(2000)	    NULL
	,LPAR_PRODUCTID	VARCHAR2(200)	    NULL
	,LPAR_LMGR_ID	NUMBER(30)	    NULL
	,LPAR_COMMERCIAL_COMMENT	VARCHAR2(2000)	    NULL
	,LPAR_TECHNICAL_COMMENT	VARCHAR2(2000)	    NULL
	,LPAR_CREATEDDATE	DATE	    NULL
	,LPAR_CREATEDBY_XCMS_ID	NUMBER(30)	    NULL
	,LPAR_MODIFIEDDATE	DATE	    NULL
	,LPAR_MODIFIEDBY_XCMS_ID	NUMBER(30)	    NULL
	,LPAR_VALIDUNTILDATE	DATE	    NULL
	,LPAR_EXTERNAL_REFERENCED	NUMBER(1)	    NULL
	,LPAR_EXTERNAL_REFERENCEDATE	DATE	    NULL
	,LPAR_LSTA_ID	NUMBER(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE LPAR ADD (
	CONSTRAINT LPAR_PK
	PRIMARY KEY
	            (
	             LPAR_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX LPAR_CREATEDBY_XCMS_ID ON LPAR
	(
	  LPAR_CREATEDBY_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX LPAR_LMGR_ID ON LPAR
	(
	  LPAR_LMGR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX LPAR_LSTA_ID ON LPAR
	(
	  LPAR_LSTA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX LPAR_MODIFIEDBY_XCMS_ID ON LPAR
	(
	  LPAR_MODIFIEDBY_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  LPLP  */
CREATE TABLE LPLP (
	 LPLP_ID	NUMBER(30)	NOT NULL
	,LPLP_LPAR_ID	NUMBER(30)	NOT NULL
	,LPLP_LPRL_ID	NUMBER(30)	NOT NULL
	,LPLP_VENDOR_ZCUR_ID	NUMBER(30)	    NULL
	,LPLP_VENDOR_BUYPRICE	NUMBER(30,4)	    NULL
	,LPLP_LOCAL_ZCUR_ID	NUMBER(30)	    NULL
	,LPLP_LOCAL_BUYPRICE	NUMBER(30,4)	    NULL
	,LPLP_ENTEREDIN_ZCUR_ID	NUMBER(30)	    NULL
	,LPLP_TRANSFERPRICE	NUMBER(30,4)	    NULL
	,LPLP_MSRP	NUMBER(30,4)	    NULL
	,LPLP_PERCENTAGEMODIFIER	NUMBER(30,4)	    NULL
	,LPLP_VALIDUNTILDATE	DATE	    NULL
	,LPLP_MODIFIEDDATE	DATE	    NULL
	,LPLP_MODIFIEDBY_XCMS_ID	NUMBER(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE LPLP ADD (
	CONSTRAINT LPLP_PK
	PRIMARY KEY
	            (
	             LPLP_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX LPLP_ENTEREDIN_ZCUR_ID ON LPLP
	(
	  LPLP_ENTEREDIN_ZCUR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX LPLP_LOCAL_ZCUR_ID ON LPLP
	(
	  LPLP_LOCAL_ZCUR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX LPLP_LPAR_ID ON LPLP
	(
	  LPLP_LPAR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX LPLP_LPRL_ID ON LPLP
	(
	  LPLP_LPRL_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX LPLP_MODIFIEDBY_XCMS_ID ON LPLP
	(
	  LPLP_MODIFIEDBY_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX LPLP_VENDOR_ZCUR_ID ON LPLP
	(
	  LPLP_VENDOR_ZCUR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  LPRL  */
CREATE TABLE LPRL (
	 LPRL_ID	NUMBER(30)	NOT NULL
	,LPRL_SHORTDESC	VARCHAR2(5)	    NULL
	,LPRL_LONGDESC	VARCHAR2(200)	    NULL
	,LPRL_DEFAULT	NUMBER(1)	    NULL
	,LPRL_DISPLORDER	NUMBER(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE LPRL ADD (
	CONSTRAINT LPRL_PK
	PRIMARY KEY
	            (
	             LPRL_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX LPRL_DISPLORDER ON LPRL
	(
	  LPRL_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  LSTA  */
CREATE TABLE LSTA (
	 LSTA_ID	NUMBER(30)	NOT NULL
	,LSTA_SHORTDESC	VARCHAR2(10)	    NULL
	,LSTA_LONGDESC	VARCHAR2(200)	    NULL
	,LSTA_DISPLORDER	NUMBER(3)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE LSTA ADD (
	CONSTRAINT LSTA_PK
	PRIMARY KEY
	            (
	             LSTA_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX LSTA_DISPLORDER ON LSTA
	(
	  LSTA_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  MLOG  */
CREATE TABLE MLOG (
	 MLOG_ID	NUMBER(30)	NOT NULL
	,MLOG_TIME	DATE	NOT NULL
	,MLOG_SYSDAT	DATE	NOT NULL
	,MLOG_TYPE	NUMBER(1)	NOT NULL
	,MLOG_TEXT	VARCHAR2(100)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE MLOG ADD (
	CONSTRAINT MLOG_PK
	PRIMARY KEY
	            (
	             MLOG_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

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

/*  WADV  */
CREATE TABLE WADV (
	 WADV_ID	NUMBER(30)	NOT NULL
	,WADV_NAME	VARCHAR2(60)	    NULL
	,WADV_HTML	VARCHAR2(1000)	    NULL
	,WADV_ADV_START	DATE	    NULL
	,WADV_ADV_END	DATE	    NULL
	,WADV_BOOK_START	DATE	    NULL
	,WADV_BOOK_END	DATE	    NULL
	,WADV_WIMG_ID	NUMBER(30)	    NULL
	,WADV_DISPLORDER	NUMBER(4)	    NULL
	,WADV_INACTIVE	NUMBER(1)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8LARGE
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WADV ADD (
	CONSTRAINT WADV_PK
	PRIMARY KEY
	            (
	             WADV_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX WADV_DISPLORDER ON WADV
	(
	  WADV_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX WADV_WIMG_ID ON WADV
	(
	  WADV_WIMG_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  WCOR  */
CREATE TABLE WCOR (
	 WCOR_ID	NUMBER(30)	NOT NULL
	,WCOR_WACT_ID	NUMBER(30)	NOT NULL
	,WCOR_WMAI_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WCOR ADD (
	CONSTRAINT WCOR_PK
	PRIMARY KEY
	            (
	             WCOR_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX WCOR_WACT_ID ON WCOR
	(
	  WCOR_WACT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX WCOR_WMAI_ID ON WCOR
	(
	  WCOR_WMAI_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  WIMG  */
CREATE TABLE WIMG (
	 WIMG_ID	NUMBER(30)	NOT NULL
	,WIMG_IMAGE	LONG RAW	    NULL
	,WIMG_IMPORTDATE	DATE	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8LARGE
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WIMG ADD (
	CONSTRAINT WIMG_PK
	PRIMARY KEY
	            (
	             WIMG_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  WUSR_DEFINITION  */
CREATE TABLE WUSR_DEFINITION (
	 WUSR_DEFINITION_ID	NUMBER(30)	NOT NULL
	,WUSR_DEFINITION_NAME	VARCHAR2(200)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE WUSR_DEFINITION ADD (
	CONSTRAINT WUSR_DEFINITION_PK
	PRIMARY KEY
	            (
	             WUSR_DEFINITION_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  XCCM  */
CREATE TABLE XCCM (
	 XCCM_ID	NUMBER(30)	NOT NULL
	,XCCM_XCMS_ID	NUMBER(30)	NOT NULL
	,XCCM_ACTIVE	NUMBER(1)	NOT NULL
	,XCCM_DATE	DATE DEFAULT sysdate 	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XCCM ADD (
	CONSTRAINT XCCM_PK
	PRIMARY KEY
	            (
	             XCCM_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE UNIQUE INDEX XCCM_XCMS_ID ON XCCM
	(
	  XCCM_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
ALTER TABLE XCCM ADD (
	CONSTRAINT SYS_C0048314
	UNIQUE
	       (
	        XCCM_XCMS_ID
	       )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  XCEA  */
CREATE TABLE XCEA (
	 XCEA_ID	NUMBER(30)	NOT NULL
	,XCEA_XCED_ID	NUMBER(30)	NOT NULL
	,XCEA_WATY_ID	NUMBER(30)	NOT NULL
	,XCEA_STARTDATE	DATE	    NULL
	,XCEA_ENDDATE	DATE	    NULL
	,XCEA_GOAL	NUMBER(30,4)	    NULL
	,XCEA_UNCOMPLETED	NUMBER(5)	    NULL
	,XCEA_COMPLETED	NUMBER(5)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XCEA ADD (
	CONSTRAINT XCEA_PK
	PRIMARY KEY
	            (
	             XCEA_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XCEA_WATY_ID ON XCEA
	(
	  XCEA_WATY_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XCEA_XCED_ID ON XCEA
	(
	  XCEA_XCED_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XCEG  */
CREATE TABLE XCEG (
	 XCEG_ID	NUMBER(30)	NOT NULL
	,XCEG_XCED_ID	NUMBER(30)	NOT NULL
	,XCEG_ZDCO_ID	NUMBER(30)	NOT NULL
	,XCEG_STARTDATE	DATE	    NULL
	,XCEG_ENDDATE	DATE	    NULL
	,XCEG_GOAL	NUMBER(30,4)	NOT NULL
	,XCEG_FORECAST	NUMBER(30,4)	    NULL
	,XCEG_REVENUE	NUMBER(30,4)	    NULL
	,XCEG_GOAL_NOOFNIGHTS	NUMBER(5)	    NULL
	,XCEG_FC_NOOFNIGHTS	NUMBER(5)	    NULL
	,XCEG_NOOFNIGHTS	NUMBER(5)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XCEG ADD (
	CONSTRAINT XCEG_PK
	PRIMARY KEY
	            (
	             XCEG_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XCEG_XCED_ID ON XCEG
	(
	  XCEG_XCED_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XCEG_ZDCO_ID ON XCEG
	(
	  XCEG_ZDCO_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XCMG  */
CREATE TABLE XCMG (
	 XCMG_ID	NUMBER(30)	NOT NULL
	,XCMG_XCMS_ID	NUMBER(30)	NOT NULL
	,XCMG_CRSTYPE	VARCHAR2(30)	NOT NULL
	,XCMG_GLOBALID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XCMG ADD (
	CONSTRAINT XCMG_PK
	PRIMARY KEY
	            (
	             XCMG_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE UNIQUE INDEX XCMG_XCMS_GLOBALID ON XCMG
	(
	  XCMG_CRSTYPE
	 ,XCMG_GLOBALID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XCMG_XCMS_ID ON XCMG
	(
	  XCMG_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XCTH  */
CREATE TABLE XCTH (
	 XCTH_ID	NUMBER(30)	NOT NULL
	,XCTH_NAME	VARCHAR2(30)	    NULL
	,XCTH_ROOMNIGHTS	NUMBER(30)	    NULL
	,XCTH_GROSSREV	NUMBER(30,4)	    NULL
	,XCTH_GROSSROOMREV	NUMBER(30,4)	    NULL
	,XCTH_NOOFATTENDEES	NUMBER(30)	    NULL
	,XCTH_NOOFEVENTS	NUMBER(30)	    NULL
	,XCTH_CCMGROSSREV	NUMBER(30,4)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XCTH ADD (
	CONSTRAINT XCTH_PK
	PRIMARY KEY
	            (
	             XCTH_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  XCTL  */
CREATE TABLE XCTL (
	 XCTL_ID	NUMBER(30)	NOT NULL
	,XCTL_XCTH_ID	NUMBER(30)	NOT NULL
	,XCTL_XMNR_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XCTL ADD (
	CONSTRAINT XCTL_PK
	PRIMARY KEY
	            (
	             XCTL_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XCTL_XCTH_ID ON XCTL
	(
	  XCTL_XCTH_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE UNIQUE INDEX XCTL_XMNR_ID ON XCTL
	(
	  XCTL_XMNR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XMLD  */
CREATE TABLE XMLD (
	 XMLD_ID	NUMBER(30)	NOT NULL
	,XMLD_XMSR_ID	NUMBER(30)	NOT NULL
	,XMLD_NAME	VARCHAR2(1000)	NOT NULL
	,XMLD_FULLPATH	VARCHAR2(1000)	NOT NULL
	,XMLD_FOLDERID	VARCHAR2(1000)	NOT NULL
	,XMLD_ENABLED	NUMBER(1)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XMLD ADD (
	CONSTRAINT XMLD_PK
	PRIMARY KEY
	            (
	             XMLD_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XMLD_XMSR_ID ON XMLD
	(
	  XMLD_XMSR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XMLI  */
CREATE TABLE XMLI (
	 XMLI_ID	NUMBER(30)	NOT NULL
	,XMLI_MAILID	VARCHAR2(500)	NOT NULL
	,XMLI_XCED_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XMLI ADD (
	CONSTRAINT XMLI_PK
	PRIMARY KEY
	            (
	             XMLI_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XMLI_XCED_ID ON XMLI
	(
	  XMLI_XCED_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XMLR  */
CREATE TABLE XMLR (
	 XMLR_ID	NUMBER(30)	NOT NULL
	,XMLR_XMLS_ID	NUMBER(30)	NOT NULL
	,XMLR_XCMS_ID	NUMBER(30)	    NULL
	,XMLR_ADDRESS	VARCHAR2(200)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XMLR ADD (
	CONSTRAINT XMLR_PK
	PRIMARY KEY
	            (
	             XMLR_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XMLR_XCMS_ID ON XMLR
	(
	  XMLR_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XMLR_XMLS_ID ON XMLR
	(
	  XMLR_XMLS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XMLS  */
CREATE TABLE XMLS (
	 XMLS_ID	NUMBER(30)	NOT NULL
	,XMLS_MAILID	VARCHAR2(500)	NOT NULL
	,XMLS_STOREID	VARCHAR2(500)	NOT NULL
	,XMLS_INCOMING	NUMBER(1)	NOT NULL
	,XMLS_SUBJECT	VARCHAR2(200)	    NULL
	,XMLS_SENTTIME	DATE	    NULL
	,XMLS_RECEIVEDTIME	DATE	    NULL
	,XMLS_PROCESSED	NUMBER(1)	    NULL
	,XMLS_XMSR_ID	NUMBER(30)	    NULL
	,XMLS_XMSR_TYPE	NUMBER(1)	NOT NULL
	,XMLS_PROCESSEDBY_XCED_ID	NUMBER(30)	    NULL
	,XMLS_PROCESSEDTIME	DATE	    NULL
	,XMLS_WTXT_ID	NUMBER(30)	    NULL
	,XMLS_IMPORTTIME	DATE	NOT NULL
	,XMLS_IMPORT_XCMS_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XMLS ADD (
	CONSTRAINT XMLS_PK
	PRIMARY KEY
	            (
	             XMLS_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XMLS_IMPORT_XCMS_ID ON XMLS
	(
	  XMLS_IMPORT_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE UNIQUE INDEX XMLS_MAILID ON XMLS
	(
	  XMLS_MAILID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
ALTER TABLE XMLS ADD (
	CONSTRAINT SYS_C0048387
	UNIQUE
	       (
	        XMLS_MAILID
	       )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XMLS_PROCESSEDBY_XCED_ID ON XMLS
	(
	  XMLS_PROCESSEDBY_XCED_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XMLS_WTXT_ID ON XMLS
	(
	  XMLS_WTXT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XMLS_XMSR_ID ON XMLS
	(
	  XMLS_XMSR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  XMSR  */
CREATE TABLE XMSR (
	 XMSR_ID	NUMBER(30)	NOT NULL
	,XMSR_TYPE	NUMBER(1)	NOT NULL
	,XMSR_XCED_ID	NUMBER(30)	NOT NULL
	,XMSR_WPCA_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE XMSR ADD (
	CONSTRAINT XMSR_PK
	PRIMARY KEY
	            (
	             XMSR_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX XMSR_WPCA_ID ON XMSR
	(
	  XMSR_WPCA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XMSR_XCED_ID ON XMSR
	(
	  XMSR_XCED_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YBPC  */
CREATE TABLE YBPC (
	 YBPC_ID	NUMBER(30)	NOT NULL
	,YBPC_YBLH_ID	NUMBER(30)	NOT NULL
	,YBPC_YPAC_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YBPC ADD (
	CONSTRAINT YBPC_PK
	PRIMARY KEY
	            (
	             YBPC_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YBPC_YBLH_ID ON YBPC
	(
	  YBPC_YBLH_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YBPC_YPAC_ID ON YBPC
	(
	  YBPC_YPAC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YCIM  */
CREATE TABLE YCIM (
	 YCIM_ID	NUMBER(30)	NOT NULL
	,YCIM_YCAT_ID	NUMBER(30)	    NULL
	,YCIM_WIMG_ID	NUMBER(30)	    NULL
	,YCIM_DESCRIPTION	VARCHAR2(60)	    NULL
	,YCIM_IMAGETYPE	NUMBER(3)	    NULL
	,YCIM_WEBENABLED	NUMBER(3)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YCIM ADD (
	CONSTRAINT YCIM_PK
	PRIMARY KEY
	            (
	             YCIM_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YCIM_WIMG_ID ON YCIM
	(
	  YCIM_WIMG_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YCIM_YCAT_ID ON YCIM
	(
	  YCIM_YCAT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YPIL  */
CREATE TABLE YPIL (
	 YPIL_ID	NUMBER(30)	NOT NULL
	,YPIL_YPAC_ID	NUMBER(30)	NOT NULL
	,YPIL_YCIT_ID	NUMBER(30)	NOT NULL
	,YPIL_NUMBER	NUMBER(4)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YPIL ADD (
	CONSTRAINT YPIL_PK
	PRIMARY KEY
	            (
	             YPIL_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YPIL_YCIT_ID ON YPIL
	(
	  YPIL_YCIT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YPIL_YPAC_ID ON YPIL
	(
	  YPIL_YPAC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YRET  */
CREATE TABLE YRET (
	 YRET_ID	NUMBER(30)	NOT NULL
	,YRET_YRES_ID	NUMBER(30)	NOT NULL
	,YRET_YPAC_ID	NUMBER(30)	NOT NULL
	,YRET_QUANTITY	NUMBER(3)	NOT NULL
	,YRET_OUTTIME	DATE	NOT NULL
	,YRET_BACKTIME	DATE	    NULL
	,YRET_DEPOSIT_ZPOS_ID	NUMBER(30)	    NULL
	,YRET_ANTIDEPOSIT_ZPOS_ID	NUMBER(30)	    NULL
	,YRET_NORETURN_ZPOS_ID	NUMBER(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YRET ADD (
	CONSTRAINT YRET_PK
	PRIMARY KEY
	            (
	             YRET_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YRET_ANTIDEPOSIT_ZPOS_ID ON YRET
	(
	  YRET_ANTIDEPOSIT_ZPOS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YRET_DEPOSIT_ZPOS_ID ON YRET
	(
	  YRET_DEPOSIT_ZPOS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YRET_NORETURN_ZPOS_ID ON YRET
	(
	  YRET_NORETURN_ZPOS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YRET_YPAC_ID ON YRET
	(
	  YRET_YPAC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YRET_YRES_ID ON YRET
	(
	  YRET_YRES_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YRMD  */
CREATE TABLE YRMD (
	 YRMD_ID	NUMBER(30)	NOT NULL
	,YRMD_YRES_ID	NUMBER(30)	NOT NULL
	,YRMD_DAY	DATE	NOT NULL
	,YRMD_REASON	VARCHAR2(200)	    NULL
	,YRMD_TIME	DATE	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YRMD ADD (
	CONSTRAINT YRMD_PK
	PRIMARY KEY
	            (
	             YRMD_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YRMD_DAY ON YRMD
	(
	  YRMD_DAY
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YRMD_YRES_ID ON YRMD
	(
	  YRMD_YRES_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YRRL  */
CREATE TABLE YRRL (
	 YRRL_ID	NUMBER(30)	NOT NULL
	,YRRL_YRES_ID	NUMBER(30)	NOT NULL
	,YRRL_ZRDF_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YRRL ADD (
	CONSTRAINT YRRL_PK
	PRIMARY KEY
	            (
	             YRRL_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YRRL_YRES_ID ON YRRL
	(
	  YRRL_YRES_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YRRL_ZRDF_ID ON YRRL
	(
	  YRRL_ZRDF_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  YXLS  */
CREATE TABLE YXLS (
	 YXLS_ID	NUMBER(30)	NOT NULL
	,YXLS_LONGDESC	VARCHAR2(60)	    NULL
	,YXLS_HEADER	NUMBER(1)	    NULL
	,YXLS_COLUMNS	VARCHAR2(100)	    NULL
	,YXLS_INACTIVE	NUMBER(1)	    NULL
	,YXLS_DISPLORDER	NUMBER(3)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE YXLS ADD (
	CONSTRAINT YXLS_PK
	PRIMARY KEY
	            (
	             YXLS_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX YXLS_DISPLORDER ON YXLS
	(
	  YXLS_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZCFC  */
CREATE TABLE ZCFC (
	 ZCFC_ID	NUMBER(30)	NOT NULL
	,ZCFC_XCAP_ID	NUMBER(30)	NOT NULL
	,ZCFC_CURR_CODE	VARCHAR2(6)	NOT NULL
	,ZCFC_CURR_RATE	NUMBER(30,8)	    NULL
	,ZCFC_AMOUNT	NUMBER(30,6)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8MAIN
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZCFC ADD (
	CONSTRAINT ZCFC_PK
	PRIMARY KEY
	            (
	             ZCFC_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ZCFC_XCAP_ID ON ZCFC
	(
	  ZCFC_XCAP_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  ZCNV  */
CREATE TABLE ZCNV (
	 ZCNV_ID	NUMBER(30)	NOT NULL
	,ZCNV_TYPE	NUMBER(2)	NOT NULL
	,ZCNV_INTERFACEID	NUMBER(30)	    NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZCNV ADD (
	CONSTRAINT ZCNV_PK
	PRIMARY KEY
	            (
	             ZCNV_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;

/*  ZCUC  */
CREATE TABLE ZCUC (
	 ZCUC_ID	NUMBER(30)	NOT NULL
	,ZCUC_ZCCA_ID	NUMBER(30)	NOT NULL
	,ZCUC_DESCRIPTION	VARCHAR2(30)	NOT NULL
	,ZCUC_CHOICE	NUMBER(2)	NOT NULL
	,ZCUC_USAGE_ZCCA_ID	NUMBER(30)	NOT NULL
)
PCTFREE  10
PCTUSED  40
INITRANS 1
MAXTRANS 255
TABLESPACE V8CONF
    STORAGE (
	INITIAL 64K
	NEXT 64K
	MINEXTENTS 1
	MAXEXTENTS 2147483645
	PCTINCREASE 50
	FREELISTS 1 FREELIST GROUPS 1
        )
;

ALTER TABLE ZCUC ADD (
	CONSTRAINT ZCUC_PK
	PRIMARY KEY
	            (
	             ZCUC_ID
	            )
	USING INDEX
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
)
;
CREATE INDEX ZCUC_USAGE_ZCCA_ID ON ZCUC
	(
	  ZCUC_USAGE_ZCCA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZCUC_ZCCA_ID ON ZCUC
	(
	  ZCUC_ZCCA_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

/*  RPSL  */
CREATE TABLE RPSL
(
  RPSL_ID            NUMBER (30) NOT NULL,
  RPSL_LONGDESC      VARCHAR2 (30),
  RPSL_NUMERICDESC   NUMBER (3),  
  RPSL_USER          NUMBER (1),
  RPSL_DEFAULT       NUMBER (1),
  RPSL_INACTIVE      NUMBER (1), CONSTRAINT RPSL_PK PRIMARY KEY (RPSL_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;

/*  MQU1  */
CREATE TABLE MQU1
(
  MQU1_ID             NUMBER(30)                NOT NULL,
  MQU1_VENDOR_NO      NUMBER(30),
  MQU1_GUID           VARCHAR2(40 BYTE),
  MQU1_TYPE           VARCHAR2(5 BYTE),
  MQU1_PROPERTY_NAME  VARCHAR2(30 BYTE),
  MQU1_FILENAME       VARCHAR2(50 BYTE),
  MQU1_BUILDING       VARCHAR2(3 BYTE),
  MQU1_MESSAGE        CLOB,
  MQU1_HTTPVALUES     VARCHAR2(200 BYTE),
  MQU1_RECEIVED       DATE, CONSTRAINT MQU1_PK PRIMARY KEY (MQU1_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8LARGE;

/*  MQU2  */
CREATE TABLE MQU2
(
  MQU2_ID             NUMBER(30)                NOT NULL,
  MQU2_VENDOR_NO      NUMBER(30),
  MQU2_GUID           VARCHAR2(40 BYTE),
  MQU2_TYPE           VARCHAR2(5 BYTE),
  MQU2_PROPERTY_NAME  VARCHAR2(30 BYTE),
  MQU2_FILENAME       VARCHAR2(50 BYTE),
  MQU2_BUILDING       VARCHAR2(3 BYTE),
  MQU2_MESSAGE        CLOB,
  MQU2_HTTPVALUES     VARCHAR2(200 BYTE),
  MQU2_RECEIVED       DATE, CONSTRAINT MQU2_PK PRIMARY KEY (MQU2_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8LARGE;

/*  MQU3  */
CREATE TABLE MQU3
(
  MQU3_ID             NUMBER(30)                NOT NULL,
  MQU3_VENDOR_NO      NUMBER(30),
  MQU3_GUID           VARCHAR2(40 BYTE),
  MQU3_TYPE           VARCHAR2(5 BYTE),
  MQU3_PROPERTY_NAME  VARCHAR2(30 BYTE),
  MQU3_FILENAME       VARCHAR2(50 BYTE),
  MQU3_BUILDING       VARCHAR2(3 BYTE),
  MQU3_MESSAGE        CLOB,
  MQU3_HTTPVALUES     VARCHAR2(200 BYTE),
  MQU3_RECEIVED       DATE, CONSTRAINT MQU3_PK PRIMARY KEY (MQU3_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8LARGE;

/*  MQU4  */
CREATE TABLE MQU4
(
  MQU4_ID             NUMBER(30)                NOT NULL,
  MQU4_VENDOR_NO      NUMBER(30),
  MQU4_GUID           VARCHAR2(40 BYTE),
  MQU4_TYPE           VARCHAR2(5 BYTE),
  MQU4_PROPERTY_NAME  VARCHAR2(30 BYTE),
  MQU4_FILENAME       VARCHAR2(50 BYTE),
  MQU4_BUILDING       VARCHAR2(3 BYTE),
  MQU4_MESSAGE        CLOB,
  MQU4_HTTPVALUES     VARCHAR2(200 BYTE),
  MQU4_RECEIVED       DATE, CONSTRAINT MQU4_PK PRIMARY KEY (MQU4_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8LARGE;


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


ALTER TABLE CART ADD ( CART_SELL_ZDCO_ID NUMBER(30) NULL  );

ALTER TABLE CART ADD ( CART_DEFAULT_DUARTION NUMBER(4) NULL  );

ALTER TABLE CART ADD ( CART_ISVALUECOUPON NUMBER(4) NULL  );

ALTER TABLE CART ADD ( CART_PARTIAL_REDEMPTION NUMBER(1) NULL  );

ALTER TABLE CART ADD ( CART_EXTERNALTYPE VARCHAR2(10) NULL  );

ALTER TABLE COUP MODIFY ( COUP_DESCRIPTION VARCHAR2(100)  );

ALTER TABLE COUP MODIFY ( COUP_ISSUE DATE  );

ALTER TABLE COUP ADD ( COUP_ZFAC_ID NUMBER(30) NULL  );

ALTER TABLE COUP ADD ( COUP_INACTIVE NUMBER(1) NULL  );

ALTER TABLE COUP ADD ( COUP_INACTIVEDATE DATE NULL  );

ALTER TABLE COUP ADD ( COUP_INACTIVECOMMENT VARCHAR2(500) NULL  );

ALTER TABLE COUP ADD ( COUP_PRINTED NUMBER(1) NULL  );

ALTER TABLE MAVL ADD ( MAVL_ZCNV_ID NUMBER(30) NULL  );

ALTER TABLE MCNV ADD ( MCNV_ZCNV_ID NUMBER(30) NULL  );

ALTER TABLE MCOP ADD ( MCOP_ZCNV_ID NUMBER(30) NULL  );

ALTER TABLE MDEF ADD ( MDEF_ZCNV_ID NUMBER(30) NULL  );

ALTER TABLE PTIK ADD ( PTIK_ZFST_ID NUMBER(30) NULL  );

ALTER TABLE PTSQ ADD ( PTSQ_PROCESSEDNULL NUMBER(1) NULL  );

ALTER TABLE RRES ADD ( RRES_PLACEDTIME DATE NULL  );

ALTER TABLE RRES ADD ( RRES_LEFTTABLETIME DATE NULL  );

ALTER TABLE RRST ADD ( RRST_INACTIVE NUMBER(1) NULL  );

ALTER TABLE WACT ADD ( WACT_HC_EXTRAINFO VARCHAR2(2000) NULL  );

ALTER TABLE WACT ADD ( WACT_REMINDTIME DATE NULL  );

ALTER TABLE WACT ADD ( WACT_REMINDTIMEAFTER DATE NULL  );

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

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

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

ALTER TABLE WATY ADD ( WATY_DUEMIN NUMBER(5) NULL  );

ALTER TABLE WATY ADD ( WATY_REMIND NUMBER(5) NULL  );

ALTER TABLE WATY ADD ( WATY_REMINDAFTER NUMBER(5) NULL  );

ALTER TABLE WEGR ADD ( WEGR_RPSL_ID NUMBER(30) NULL  );

ALTER TABLE WFMC ADD ( WFMC_WLAN_ID NUMBER(30) NULL  );

ALTER TABLE WFTR MODIFY ( WFTR_FORM VARCHAR2(200)  );

ALTER TABLE WFTR MODIFY ( WFTR_COMPONENT VARCHAR2(200)  );

ALTER TABLE WMAI ADD ( WMAI_SMS NUMBER(1) DEFAULT 0 NULL  );

ALTER TABLE WMAI ADD ( WMAI_SMSCONFIRMCODE VARCHAR2(100) NULL  );

ALTER TABLE WPHS ADD ( WPHS_MULTIV8USER VARCHAR2(30) NULL  );

ALTER TABLE WPHS ADD ( WPHS_MULTIV8PW VARCHAR2(30) NULL  );

ALTER TABLE WPHS ADD ( WPHS_DBPW VARCHAR2(50) NULL  );

ALTER TABLE WPHS ADD ( WPHS_DBALIAS VARCHAR2(50) NULL  );

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

ALTER TABLE WPHS ADD ( WPHS_WCOL_ID NUMBER(30) NULL  );

ALTER TABLE WPJC ADD ( WPJC_ADVANCED NUMBER(1) NULL  );

ALTER TABLE WPJC ADD ( WPJC_PRIM_PAGES NUMBER(1) NULL  );

ALTER TABLE WPJC ADD ( WPJC_SEC_PAGES NUMBER(1) NULL  );

ALTER TABLE WPJC ADD ( WPJC_PRIM_FIRST_TO NUMBER(5) NULL  );

ALTER TABLE WPJC ADD ( WPJC_PRIM_FROM_TO NUMBER(5) NULL  );

ALTER TABLE WPJC ADD ( WPJC_PRIM_FROM_TO_END NUMBER(5) NULL  );

ALTER TABLE WPJC ADD ( WPJC_SEC_FIRST_TO NUMBER(5) NULL  );

ALTER TABLE WPJC ADD ( WPJC_SEC_FROM_TO NUMBER(5) NULL  );

ALTER TABLE WPJC ADD ( WPJC_SEC_FROM_TO_END NUMBER(5) NULL  );

ALTER TABLE WPJC ADD ( WPJC_PRIM_COPIES NUMBER(2) NULL  );

ALTER TABLE WPJC ADD ( WPJC_SEC_COPIES NUMBER(1) NULL  );

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

ALTER TABLE WRPS ADD ( WRPS_RPSL_ID NUMBER(30) NULL  );

ALTER TABLE WRPT ADD ( WRPT_EXTERNAL_ID VARCHAR2(10) NULL  );

ALTER TABLE WRPT ADD ( WRPT_RPSL_ID NUMBER(30) NULL  );

ALTER TABLE XCAP ADD ( XCAP_CURRENCY VARCHAR2(6) NULL  );

ALTER TABLE XCAP ADD ( XCAP_ZCUC_ID NUMBER(30) NULL  );

ALTER TABLE XCAP ADD ( XCAP_AUTH_TYPE NUMBER(1) NULL  );

ALTER TABLE XCAP ADD ( XCAP_INSTALLMENTS NUMBER(2) NULL  );

ALTER TABLE XCCS ADD ( XCCS_EFT_USAGEVALUE NUMBER(2) NULL  );

ALTER TABLE XCED ADD ( XCED_RPSL_ID NUMBER(30) NULL  );

ALTER TABLE XCIL ADD ( XCIL_POSITION VARCHAR2(60) NULL  );

ALTER TABLE XCIL ADD ( XCIL_DEPARTMENT VARCHAR2(60) NULL  );

ALTER TABLE XCMS ADD ( XCMS_HC_TOUCHED DATE NULL  );

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

ALTER TABLE XCNC ADD ( XCNC_POPUP_PROFILE NUMBER(1) DEFAULT 0 NOT NULL  );

ALTER TABLE XCNC ADD ( XCNC_POPUP_RESERVATION NUMBER(1) DEFAULT 0 NOT NULL  );

ALTER TABLE XCNC ADD ( XCNC_POPUP_CCM NUMBER(1) DEFAULT 0 NOT NULL  );

ALTER TABLE XCNC ADD ( XCNC_POPUP_BILLINGOPEN NUMBER(1) DEFAULT 0 NOT NULL  );

ALTER TABLE XCOU DROP COLUMN XCOU_PSCANSTRING;

ALTER TABLE XPAC ADD ( XPAC_THIRDPARTYID NUMBER(30) NULL  );

ALTER TABLE XPDA ADD ( XPDA_THIRDPARTYID NUMBER(30) NULL  );

ALTER TABLE XREG DROP COLUMN XREG_PSCANSTRING;

ALTER TABLE XSCD ADD ( XSCD_SENDER VARCHAR2(100) NULL  );

ALTER TABLE XSTA DROP COLUMN XSTA_PSCANSTRING;

ALTER TABLE XSTA DROP COLUMN XSTA_PSCANDEFAULT;

ALTER TABLE YBID ADD ( YBID_LIMIT NUMBER(10,4) NULL  );

ALTER TABLE YBIS ADD ( YBIS_YBLH_ID NUMBER(30) NULL  );

ALTER TABLE YCAT ADD ( YCAT_MAX NUMBER(4) NULL  );

ALTER TABLE YCET ADD ( YCET_SHOW NUMBER(1) NULL  );

ALTER TABLE YCET ADD ( YCET_INACTIVE NUMBER(1) NULL  );

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

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

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

ALTER TABLE YPAC ADD ( YPAC_RETURNABLE NUMBER(1) NULL  );

ALTER TABLE YPAC ADD ( YPAC_NORETURNFEE NUMBER(30,4) NULL  );

ALTER TABLE YPAC ADD ( YPAC_NORETURN_ZDCO_ID NUMBER(30) NULL  );

ALTER TABLE YPAC ADD ( YPAC_DEPOSIT NUMBER(1) NULL  );

ALTER TABLE YPAC ADD ( YPAC_DONTPOSTZERO NUMBER(1) DEFAULT 0 NOT NULL  );

ALTER TABLE YRCL ADD ( YRCL_FOREIGN_CURR_CODE VARCHAR2(6) NULL  );

ALTER TABLE YRCL ADD ( YRCL_FOREIGN_CURR_OPTION NUMBER(1) NULL  );

ALTER TABLE YRCL ADD ( YRCL_ZCUC_ID NUMBER(30) NULL  );

ALTER TABLE YRCO ADD ( YRCO_PHONE VARCHAR2(30) NULL  );

ALTER TABLE YRES ADD ( YRES_NOZRDF NUMBER(1) NULL  );

ALTER TABLE ZALL ADD ( ZALL_CANCEL_ZPOS_ID NUMBER(30) NULL  );

ALTER TABLE ZCCA ADD ( ZCCA_CC_SECURITY_CODE NUMBER(1) NULL  );

ALTER TABLE ZCPL ADD ( ZCPL_XCAP_ID NUMBER(30) NULL  );

ALTER TABLE ZCPL ADD ( ZCPL_CC_INSTALLMENTS NUMBER(2) NULL  );

ALTER TABLE ZCUR ADD ( ZCUR_MONTHLY NUMBER(1) DEFAULT 0 NOT NULL  );

ALTER TABLE ZITF DROP COLUMN ZITF_TABLENAME;

ALTER TABLE ZPOS MODIFY ( ZPOS_MANUALPOST NUMBER(2)  );

ALTER TABLE ZPOS ADD ( ZPOS_INVOICEDATE DATE NULL  );

ALTER TABLE YCXL ADD ( YCXL_ORGNOAVAILREASON NUMBER(1) NULL  );

ALTER TABLE YPAC ADD ( YPAC_WEBENABLED NUMBER(1) NULL  );

ALTER TABLE YPAC ADD ( YPAC_WEBINFO VARCHAR2(1000) NULL  );

ALTER TABLE XMLS ADD ( XMLS_SENDER_XCMS_ID NUMBER(30) NULL  );

ALTER TABLE XMLS ADD ( XMLS_RECIPIENT_XCMS_ID NUMBER(30) NULL  );

ALTER TABLE XMLS ADD ( XMLS_SENDERADDRESS VARCHAR2(1000) NULL  );

ALTER TABLE XMLS ADD ( XMLS_RECIPIENTADDRESS VARCHAR2(1000) NULL  );

ALTER TABLE XMLS ADD ( XMLS_READY NUMBER(1) NULL  );   

ALTER TABLE XMLR ADD ( XMLR_SENDER NUMBER(1) NOT NULL  );

ALTER TABLE XMLD ADD ( XMLD_STOREID VARCHAR2(1000) NOT NULL  );

ALTER TABLE XMLD ADD ( XMLD_PARENT_XMLD_ID NUMBER(30) NULL  );

ALTER TABLE XMLI ADD ( XMLI_XMSR_ID NUMBER(30) NOT NULL  );

ALTER TABLE ZPOS ADD ( ZPOS_POSCHECK_UID VARCHAR2(40 CHAR) NULL  );

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

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

ALTER TABLE XSCD ADD ( XSCD_HTMLBODY NUMBER(1) NULL  );

ALTER TABLE XSCD ADD ( XSCD_RECIPIENTISQUERY NUMBER(1) NULL  );

ALTER TABLE YXLS ADD ( YXLS_FIRSTDATAROW NUMBER (10) NULL  );

ALTER TABLE YXLS ADD ( YXLS_FIRSTDATACOL NUMBER (10) NULL  );

ALTER TABLE YXLS DROP COLUMN YXLS_HEADER CASCADE CONSTRAINTS; 

ALTER TABLE ZFAC ADD ( ZFAC_CONTRACT_ZCUR_ID NUMBER(30) NULL  ); 

ALTER TABLE YPRR ADD ( YPRR_FIXAMOUNTPERNIGHT NUMBER(1) DEFAULT 0 NULL  );

ALTER TABLE ZCNV ADD ( ZCNV_SHORTDESC VARCHAR2(3) NULL  );

ALTER TABLE ZCNV ADD ( ZCNV_LONGDESC VARCHAR2(30) NULL  );

ALTER TABLE YEMI MODIFY YEMI_QUANTITY NUMBER(30,4);

ALTER TABLE MMOD ADD ( MMOD_DL_RESP_BACKUP1 NUMBER(1,0) NULL  );

ALTER TABLE YEBR ADD ( YEBR_REBATE_UNITPRICE NUMBER(30,4) NULL  );

ALTER TABLE YMRD ADD ( YMRD_REBATE_UNITPRICE NUMBER(30,4) NULL  );

ALTER TABLE YEMI ADD ( YEMI_REBATE_UNITPRICE NUMBER(30,4) NULL  );

ALTER TABLE YBEF ADD ( YBEF_REBATE_UNITPRICE NUMBER(30,4) NULL  );

ALTER TABLE WLAF MODIFY WLAF_LONGDESC VARCHAR2(60);

ALTER TABLE YPAC ADD ( YPAC_WELLNESS NUMBER(1) NULL  );

ALTER TABLE ZCCS ADD ( ZCCS_SCHEMA_NAME VARCHAR2(50) NULL  );


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

/*  ZCNV  */

CREATE UNIQUE INDEX ZCNV_SHORTDESC ON ZCNV
    (
      ZCNV_SHORTDESC
    )
    PCTFREE    10
    INITRANS   2
    MAXTRANS   255
    TABLESPACE V8INDEX
;


/*  MAVL  */

CREATE INDEX MAVL_ZCNV_ID ON MAVL
	(
	  MAVL_ZCNV_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;


/*  MCOP  */
DROP INDEX MCOP_PK;

CREATE UNIQUE INDEX MCOP_PK ON MCOP
	(
	  MCOP_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;

CREATE INDEX MCOP_ZCNV_ID ON MCOP
	(
	  MCOP_ZCNV_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;


/*  MCNV  */

CREATE INDEX MCNV_ZCNV_ID ON MCNV
	(
	  MCNV_ZCNV_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;


/*  MDEF  */

CREATE INDEX MDEF_ZCNV_ID ON MDEF
	(
	  MDEF_ZCNV_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;


/*  PMKL  */

CREATE INDEX PMKL_TIMESTAMP ON PMKL
	(
	  PMKL_TIMESTAMP
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  PTLG  */

CREATE INDEX MAX_PTLG_ID ON PTLG
	(
	  PTLG_ID
	 ,PTLG_ZFAC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  PTSQ  */

CREATE INDEX PTSQPROCESSEDNULL ON PTSQ
	(
	  PTSQ_PROCESSEDNULL
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  SAAR  */

CREATE INDEX SAAR_AINV_ID ON SAAR
	(
	  SAAR_AINV_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  ULAT  */

CREATE INDEX ULAT_WATY_ID ON ULAT
	(
	  ULAT_WATY_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ULAT_XCMS_ID ON ULAT
	(
	  ULAT_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  WACT  */

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



/*  WEGR  */

CREATE INDEX WEGR_RPSL_ID ON WEGR
	(
	  WEGR_RPSL_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  WFMC  */

CREATE INDEX WFMC_WLAN_ID ON WFMC
	(
	  WFMC_WLAN_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  WPHS  */

CREATE INDEX WPHS_WCOL_ID ON WPHS
	(
	  WPHS_WCOL_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  WRPS  */

CREATE INDEX WRPS_RPSL_ID ON WRPS
	(
	  WRPS_RPSL_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  WRPT  */

CREATE INDEX WRPT_EXTERNAL_ID ON WRPT
	(
	  WRPT_EXTERNAL_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX WRPT_RPSL_ID ON WRPT
	(
	  WRPT_RPSL_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  XCAP  */

CREATE INDEX XCAP_ZCUC_ID ON XCAP
	(
	  XCAP_ZCUC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  XCED  */

CREATE INDEX XCED_RPSL_ID ON XCED
	(
	  XCED_RPSL_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  XGCL  */

CREATE INDEX XGCL_WEGR_ID ON XGCL
	(
	  XGCL_WEGR_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XGCL_XPAC_ID ON XGCL
	(
	  XGCL_XPAC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  XPCL  */

CREATE INDEX XPCL_XCED_ID ON XPCL
	(
	  XPCL_XCED_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX XPCL_XPAC_ID ON XPCL
	(
	  XPCL_XPAC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YBIS  */

CREATE INDEX YBIS_YBLH_ID ON YBIS
	(
	  YBIS_YBLH_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YHAT  */

CREATE INDEX YHAT_YHHC_ID ON YHAT
	(
	  YHAT_YHHC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YHHC  */

CREATE INDEX YHHC_WRPT_ID ON YHHC
	(
	  YHHC_WRPT_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YHRA  */

CREATE INDEX YHRA_YAMN_ID ON YHRA
	(
	  YHRA_YAMN_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YHRA_YHRL_ID ON YHRA
	(
	  YHRA_YHRL_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YHRL  */

CREATE INDEX YHRL_YHHC_ID ON YHRL
	(
	  YHRL_YHHC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YPAC  */

CREATE INDEX YPAC_NORETURN_ZDCO_ID ON YPAC
	(
	  YPAC_NORETURN_ZDCO_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YPRR  */

CREATE INDEX YPRR_MAXDAY ON YPRR
	(
	  YPRR_MAXDAY
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YPRR_MINDAY ON YPRR
	(
	  YPRR_MINDAY
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX YPRR_RULE ON YPRR
	(
	  YPRR_RULE
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YRCH  */

CREATE INDEX YRCH_YRVL_ID ON YRCH
	(
	  YRCH_YRVL_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YRCL  */

CREATE INDEX YRCL_ZCUC_ID ON YRCL
	(
	  YRCL_ZCUC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YRVL  */

CREATE INDEX YRVL_DISPLORDER ON YRVL
	(
	  YRVL_DISPLORDER
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  YTRD  */

CREATE INDEX YTRDDATES ON YTRD
	(
	  YTRD_CALCDATE
	 ,YTRD_CALCFORDATE
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  ZALL  */

CREATE INDEX ZALL_CANCEL_ZPOS_ID ON ZALL
	(
	  ZALL_CANCEL_ZPOS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZALL_XCAC_ID ON ZALL
	(
	  ZALL_XCAC_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZALL_XCMS_ID ON ZALL
	(
	  ZALL_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  ZCPL  */

CREATE INDEX ZCPL_XCAP_ID ON ZCPL
	(
	  ZCPL_XCAP_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  ZDCO  */

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



/*  ZFAC  */

CREATE INDEX ZFAC_ZTXX_ID ON ZFAC
	(
	  ZFAC_ZTXX_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;



/*  ZRDL  */

CREATE INDEX ZRDL_XCMS_ID ON ZRDL
	(
	  ZRDL_XCMS_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;
CREATE INDEX ZRDL_YBOM_ID ON ZRDL
	(
	  ZRDL_YBOM_ID
	)
	PCTFREE    10
	INITRANS   2
	MAXTRANS   255
	TABLESPACE V8INDEX
;


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

UPDATE PTSQ SET PTSQ_PROCESSEDNULL = 1 WHERE PTSQ_PROCESSED IS NULL;

UPDATE PTSQ SET PTSQ_PROCESSEDNULL = 0 WHERE PTSQ_PROCESSED IS NOT NULL;

UPDATE ZCUR SET ZCUR_MONTHLY = 0 WHERE ZCUR_MONTHLY IS NULL;

UPDATE XCNC SET XCNC_POPUP_PROFILE = 0 WHERE XCNC_POPUP_PROFILE IS NULL;

UPDATE XCNC SET XCNC_POPUP_RESERVATION = 0 WHERE XCNC_POPUP_RESERVATION IS NULL;

UPDATE XCNC SET XCNC_POPUP_CCM = 0 WHERE XCNC_POPUP_CCM IS NULL;

UPDATE XCNC SET XCNC_POPUP_BILLINGOPEN = 0 WHERE XCNC_POPUP_BILLINGOPEN IS NULL;

UPDATE YCET SET YCET_SHOW = 0 WHERE YCET_SHOW IS NULL;

UPDATE YFXC Y SET Y.YFXC_SCRID=(SELECT MIN(YY.YFXC_ID) FROM YFXC YY,YDET YYD,YDET YD WHERE YY.YFXC_YDET_ID=YYD.YDET_ID AND Y.YFXC_YDET_ID=YD.YDET_ID AND YD.YDET_YRES_ID=YYD.YDET_YRES_ID AND Y.YFXC_ZDCO_ID=YY.YFXC_ZDCO_ID);

UPDATE WUSR SET WUSR_NAME='CashieringTax ExemptionManually apply Tax Exemption' WHERE WUSR_NAME='CashieringTax ExemptionApply tax exemption upon checkout';

UPDATE WUSS SET WUSS_NAME='RoomRackAvlType', WUSS_VALUE=0 WHERE WUSS_NAME='RoomRackNone' AND WUSS_VALUE=1; 

UPDATE WUSS SET WUSS_NAME='RoomRackAvlType', WUSS_VALUE=1 WHERE WUSS_NAME='RoomRackMinAvl' AND WUSS_VALUE=1; 

UPDATE WUSS SET WUSS_NAME='RoomRackAvlType', WUSS_VALUE=2 WHERE WUSS_NAME='RoomRackMaxAvl' AND WUSS_VALUE=1; 

UPDATE WUSS SET WUSS_NAME='RoomRackAvlType', WUSS_VALUE=3 WHERE WUSS_NAME='RoomRackMinOcc' AND WUSS_VALUE=1; 

UPDATE WUSS SET WUSS_NAME='RoomRackAvlType', WUSS_VALUE=4 WHERE WUSS_NAME='RoomRackMaxOcc' AND WUSS_VALUE=1; 

DELETE FROM WUSS WHERE WUSS_NAME='RoomRackMinAvl' ;

DELETE FROM WUSS WHERE WUSS_NAME='RoomRackMaxAvl' ;

DELETE FROM WUSS WHERE WUSS_NAME='RoomRackMaxOcc' ;

DELETE FROM WUSS WHERE WUSS_NAME='RoomRackMinOcc' ;

DELETE FROM WUSS WHERE WUSS_NAME='RoomRackNone' ;

UPDATE XCIL SET (XCIL_POSITION, XCIL_DEPARTMENT)=(SELECT XCID_POSITION, XCID_DEPARTMENT FROM XCID WHERE XCID_ID=XCIL_INDIVIDUAL_XCMS_ID) WHERE NVL(XCIL_PRIMARY, 0)=1;

INSERT INTO WUSS SELECT SEQ_WUSS.NEXTVAL, 0, 'ZBALnaProcedureName', 'FILLZBAL2' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM WUSS A WHERE A.WUSS_NAME LIKE 'ZBALnaProcedureName' AND A.WUSS_VALUE IS NOT NULL AND A.WUSS_XCMS_ID=0);

DELETE FROM WRDQ WHERE WRDQ.WRDQ_ALIAS = 'EFT' AND WRDQ.WRDQ_ROLE = 2;

INSERT INTO XPAC (XPAC_ID,XPAC_SHORTDESC,XPAC_LONGDESC,XPAC_APPLIND,XPAC_APPLCOMP,XPAC_APPLEMP,XPAC_APPLHOT,XPAC_SINGLE,XPAC_DISPLORDER,XPAC_RESORDET,XPAC_COPY_TO_RES,XPAC_MANDATORYRES,XPAC_MANDATORYACCOUNTS,XPAC_SHOWACCOUNTS,XPAC_FIRSTPAGE,XPAC_IFC,XPAC_IFC_CODE,XPAC_ISREHA,XPAC_APPLBOOKING,XPAC_APPLEVENT,XPAC_CCMPAGE,XPAC_SHOWLONGDESC,XPAC_MANDATORYBOOKING,XPAC_MANDATORYEVENT,XPAC_MANDATORYCOMP,XPAC_MANDATORYIND) VALUES ( 
19,'MDC','Micros Discounts',0,0,0,0,0,19,0,0,0,0,0,0,NULL,NULL,0,0,0,0,0,0,0,0,0); 

UPDATE XCMS SET XCMS_NOEMAILING = 1 WHERE XCMS_NOMAILING = 1;

COMMIT;


--- End of DBDiff for Oracle --- Elapsed Time: 00:00:45 ---
