--UPDATE FROM 8.8.2.2 TO 8.8.2.3


DROP TABLE VERSION_8_8_2_2;



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

CREATE TABLE XGCA (
    XGCA_ID NUMBER(30) NOT NULL
   ,XGCA_SHORTDESC VARCHAR2(5) NOT NULL 
   ,XGCA_LONGDESC VARCHAR2(30) NOT NULL
   ,XGCA_INACTIVE NUMBER(1)
   ,XGCA_DISPLORDER NUMBER(3)
   ,CONSTRAINT XGCA_PK PRIMARY KEY (XGCA_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;
   
CREATE SEQUENCE SEQ_XGCA INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;

COMMENT ON TABLE XGCA IS 'childage category groups';

ALTER TABLE YRCH ADD YRCH_XGCA_ID NUMBER(30);

COMMENT ON COLUMN YRCH.YRCH_XGCA_ID IS 'childage category group';

COMMENT ON COLUMN XCAC.XCAC_XGCA_ID IS 'childage category group';

ALTER TABLE YPKR ADD YPKR_NOOFPAX NUMBER(1);

COMMENT ON COLUMN YPKR.YPKR_NOOFPAX IS '1=yes';

ALTER TABLE YETR ADD YETR_NOOFPAX NUMBER(1);

COMMENT ON COLUMN YETR.YETR_NOOFPAX IS '1=yes';

ALTER TABLE YBOM MODIFY YBOM_NOOFATTENDEES NUMBER(5);

ALTER TABLE YGRP MODIFY YGRP_COMMENT VARCHAR2(1000);

ALTER TABLE WBCF ADD WBCF_COMMITCOUNT NUMBER (4);

COMMENT ON COLUMN WBCF.WBCF_COMMITCOUNT IS 'db commit after number of processed records';

ALTER TABLE WBCF ADD WBCF_DELAYMSEC NUMBER (4);

COMMENT ON COLUMN WBCF.WBCF_DELAYMSEC IS 'break after db commit';

ALTER TABLE PTIK ADD (PTIK_ZYTT_ID NUMBER(30));

ALTER TABLE YPAC ADD YPAC_FOLIOTEXT VARCHAR2(60);

COMMENT ON COLUMN YPAC.YPAC_FOLIOTEXT IS 'text printed on folio if package is print separate';

ALTER TABLE YBLH ADD YBLH_WEBPROMOTION VARCHAR2(30);

COMMENT ON COLUMN YBLH.YBLH_WEBPROMOTION IS 'Web promotion codes';

CREATE TABLE MRAT
(
  MRAT_ID                NUMBER(30)             NOT NULL,
  MRAT_ZCNV_ID           NUMBER(30)             NOT NULL,
  MRAT_XPAC_ID           NUMBER(30)             NOT NULL,
  MRAT_TYPE              VARCHAR2(2),
  CONSTRAINT MRAT_PK PRIMARY KEY (MRAT_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8MAIN;

COMMENT ON COLUMN MRAT.MRAT_ID IS 'unique id';

COMMENT ON COLUMN MRAT.MRAT_ZCNV_ID IS 'link to zcnv and mmod';

COMMENT ON COLUMN MRAT.MRAT_XPAC_ID IS 'xpac id';

COMMENT ON COLUMN MRAT.MRAT_TYPE IS 'conversion type. possible values are X0..X9';

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

ALTER TABLE MMOD ADD MMOD_USE_RES_ATTR NUMBER(1,0);

COMMENT ON COLUMN MMOD.MMOD_USE_RES_ATTR IS 'Indicates whether userdefine reservation attributes are used';

ALTER TABLE MCOP ADD MCOP_DESC VARCHAR2(40);

COMMENT ON COLUMN MCOP.MCOP_DESC IS 'description of user defined conversion type';

ALTER TABLE MRAT ADD MRAT_RESORDET NUMBER(1,0);

COMMENT ON COLUMN MRAT.MRAT_RESORDET IS 'Indicates whether attribute is linked to yres or ydet';

ALTER TABLE SMAN MODIFY SMAN_BEDSINHOTEL_M NUMBER(7);

ALTER TABLE SMAN MODIFY SMAN_MAXBEDSINHOTEL_M NUMBER(7);

ALTER TABLE YRCH ADD YRCH_WRPT_ID NUMBER (30);

COMMENT ON COLUMN YRCH.YRCH_WRPT_ID IS 'default confirmation letter of rate';

ALTER TABLE ZADR MODIFY ZADR_CITY VARCHAR2(60);

UPDATE YFSR SET YFSR_VALUE='0' WHERE YFSR_VALUE='-1';
