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

--UPDATE FROM 8.8.1.2 TO 8.8.2.0


DROP TABLE VERSION_8_8_1_2;



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


ALTER TABLE XCAP MODIFY XCAP_CRYPTOGRAM VARCHAR2(1000);

ALTER TABLE YETM ADD YETM_CHARGEDONCONSUMPTION NUMBER(1);

COMMENT ON COLUMN YETM.YETM_CHARGEDONCONSUMPTION IS 'Charged on consumption';

ALTER TABLE YRCH ADD YRCH_FIXED NUMBER(1);

COMMENT ON COLUMN YRCH.YRCH_FIXED IS 'yrch_fixed=1 rate amount or modifiers can not be changed in reservation if selected rate is fixed';

ALTER TABLE SMAN ADD SMAN_RESCANCELEDTODAYDEF_D NUMBER(5);

ALTER TABLE SMAN ADD SMAN_RESCANCELEDTODAYDEF_M NUMBER(5);

ALTER TABLE SMAN ADD SMAN_RESCANCELEDTODAYDEF_Y NUMBER(7);

ALTER TABLE SMAN ADD SMAN_CANCFORTODAYDEF_D NUMBER(5);

ALTER TABLE SMAN ADD SMAN_CANCFORTODAYDEF_M NUMBER(5);

ALTER TABLE SMAN ADD SMAN_CANCFORTODAYDEF_Y NUMBER(5);

ALTER TABLE YPAC ADD YPAC_STATVALUE NUMBER (30,4);

COMMENT ON COLUMN YPAC.YPAC_STATVALUE IS 'statistical value field for some hotel';

ALTER TABLE YCMP ADD YCMP_YBOM_ID NUMBER(30);

COMMENT ON COLUMN YCMP.YCMP_YBOM_ID IS 'Linked to Booking ID';

ALTER TABLE XCOM ADD (XCOM_VERIFIED NUMBER(1));

COMMENT ON COLUMN XCOM.XCOM_VERIFIED IS '0 - not validated, 1 - valid, 2 - not valid';

ALTER TABLE YRCH ADD YRCH_ZARR_ID NUMBER(30);

COMMENT ON COLUMN YRCH.YRCH_ZARR_ID IS 'default arrangement code for all department codes posted with this rate code (also packages) - in case it is empty, arrangement code from department code setup will be used instead';

ALTER TABLE WACT ADD WACT_XCMS_ID NUMBER(30);

COMMENT ON COLUMN WACT.WACT_XCMS_ID IS 'locator link to non hotel guests';

CREATE TABLE YRCA (
    YRCA_ID NUMBER(30) NOT NULL
   ,YRCA_YRCH_ID NUMBER(30) NOT NULL
   ,YRCA_XPDA_ID NUMBER(30) NOT NULL
   ,CONSTRAINT YRCA_PK PRIMARY KEY (YRCA_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;

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

COMMENT ON TABLE YRCA IS 'ratecode attribute link.';

ALTER TABLE XPAC ADD XPAC_APPLRATE NUMBER(10) DEFAULT 0 NOT NULL;

ALTER TABLE YRCH ADD YRCH_YCDP_ID NUMBER(30);

COMMENT ON COLUMN YRCH.YRCH_YCDP_ID IS 'policy link';

ALTER TABLE  YRCH ADD YRCH_BASERATE NUMBER(1);

ALTER TABLE  YRCH ADD YRCH_BASE_YRCH_ID NUMBER(30);

ALTER TABLE  YRCH ADD YRCH_BASE_TYPE NUMBER(1);

ALTER TABLE  YRCH ADD YRCH_BASE_ROUNDING NUMBER(1);

ALTER TABLE  YRCH ADD YRCH_BASE_VALUE NUMBER(10,4);

COMMENT ON COLUMN YRCH.YRCH_BASERATE IS 'Rate is a baserate';

COMMENT ON COLUMN YRCH.YRCH_BASE_YRCH_ID IS 'The parent Rate where the base rate is linked to';

COMMENT ON COLUMN YRCH.YRCH_BASE_ROUNDING IS 'rounding of the rate values, 0=no rounding, 1=round up,  2=round down, 3=round decimal up, 4= round decimal down';

COMMENT ON COLUMN YRCH.YRCH_BASE_TYPE IS 'Base rate type is 0=percentage, 1= discount amount';

COMMENT ON COLUMN YRCH.YRCH_BASE_VALUE IS 'Base rate value';

ALTER TABLE YBLH ADD YBLH_SEARCHNAME VARCHAR2(30);

COMMENT ON COLUMN YBLH.YBLH_SEARCHNAME IS 'Alternate block search name';

COMMENT ON COLUMN YHKS.YHKS_CLEAN IS ' 1 = Clean  0 = Dirty';

ALTER TABLE YPAC ADD YPAC_MASTER_YPAC_ID NUMBER(30);

COMMENT ON COLUMN YPAC.YPAC_MASTER_YPAC_ID IS 'link between master and sub packages';

ALTER TABLE YPRL ADD YPRL_MASTER_YPAC_ID NUMBER(30);

COMMENT ON COLUMN YPRL.YPRL_MASTER_YPAC_ID IS 'link to master package from sub package';

ALTER TABLE YCIT ADD YCIT_COSTPRICE NUMBER(30,4);

COMMENT ON COLUMN YCIT.YCIT_COSTPRICE IS 'Cost price';

ALTER TABLE YCIR ADD YCIR_COSTPRICE NUMBER(30,4);

COMMENT ON COLUMN YCIR.YCIR_COSTPRICE IS 'Cost price';

ALTER TABLE YFSC ADD YFSC_COSTPRICE NUMBER(30,4);

COMMENT ON COLUMN YFSC.YFSC_COSTPRICE IS 'Cost price';

ALTER TABLE YFSR ADD YFSR_COSTPRICE NUMBER(30,4);

COMMENT ON COLUMN YFSR.YFSR_COSTPRICE IS 'Cost price';

ALTER TABLE YSME ADD YSME_COSTPRICE NUMBER(30,4);

COMMENT ON COLUMN YSME.YSME_COSTPRICE IS 'Cost price';

ALTER TABLE YSMR ADD YSMR_COSTPRICE NUMBER(30,4);

COMMENT ON COLUMN YSMR.YSMR_COSTPRICE IS 'Cost price';

ALTER TABLE YEBS ADD YEBS_COSTPRICE NUMBER(30,4);

COMMENT ON COLUMN YEBS.YEBS_COSTPRICE IS 'Cost price';

ALTER TABLE YEBR ADD YEBR_COSTPRICE NUMBER(30,4);

COMMENT ON COLUMN YEBR.YEBR_COSTPRICE IS 'Cost Price';

ALTER TABLE YEMN ADD YEMN_COSTPRICE NUMBER(30,4);

COMMENT ON COLUMN YEMN.YEMN_COSTPRICE IS 'Cost Price';

ALTER TABLE YRSC ADD YRSC_WCOL_ID NUMBER(30);

CREATE TABLE YCDD (
   YCDD_ID NUMBER(30) NOT NULL
  ,YCDD_WLAN_ID NUMBER(30) NOT NULL
  ,YCDD_YCDP_ID NUMBER(30) NOT NULL
  ,YCDD_LONGDESC VARCHAR2(2000) NOT NULL
  ,CONSTRAINT YCDD_PK PRIMARY KEY (YCDD_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;

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

COMMENT ON TABLE YCDD IS 'Policy description';

ALTER TABLE ZFAC ADD (ZFAC_FREETEXT1 VARCHAR2(100 CHAR), ZFAC_FREETEXT2 VARCHAR2(100 CHAR));

ALTER TABLE MCFG ADD MCFG_MLOG_PURGE_DAYS NUMBER(2,0);

COMMENT ON COLUMN MCFG.MCFG_MLOG_PURGE_DAYS IS 'number of days to purge mlog';

ALTER TABLE XSCD ADD (XSCD_EXPORTBATCH NUMBER(1));

COMMENT ON COLUMN WRPP.WRPP_TYPE IS ' 0 = string  1 = integer  2 = date  3 = time  4 = Date type  5 = Combo Box  6 = Multi Select Box  7 = Boolean';

COMMENT ON COLUMN WSCT.WSCT_ROLE IS '1 Folio supplement, 2 Email Body Default, 3 City Ledger invoice supplement';
