--UPDATE FROM 8.6.4.0 TO 8.6.4.2


DROP TABLE VERSION_8_6_4_0;
DROP TABLE VERSION_8_6_4_1;



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


CREATE TABLE ZWTR
(
  ZWTR_ID         NUMBER(30)             NOT NULL,
  ZWTR_MSG        NUMBER(2)              NOT NULL,
  ZWTR_INTF       NUMBER(2)              NOT NULL,
  ZWTR_XCMS_ID    NUMBER(30),
  ZWTR_YRES_ID    NUMBER(30),
  CONSTRAINT ZWTR_PK PRIMARY KEY (ZWTR_ID) USING INDEX TABLESPACE V8INDEX  ) TABLESPACE V8MAIN ;
  
CREATE SEQUENCE seq_ZWTR INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;
   
COMMENT ON TABLE ZWTR IS 'Offline notification of wellness interfaces';  

COMMENT ON COLUMN ZWTR.ZWTR_MSG IS 'Message type. 1 - Reservation changed 2 - Profile Changed 3 - Reservation cancel / Delete FA';

COMMENT ON COLUMN ZWTR.ZWTR_INTF IS 'Interface to notify. 1 - Bellavita 2 - HIS';

COMMENT ON COLUMN ZWTR.ZWTR_XCMS_ID IS 'Profile ID';

COMMENT ON COLUMN ZWTR.ZWTR_YRES_ID IS 'Reservation ID';

ALTER TABLE ZFAG ADD ZFAG_IGNOREFISCAL NUMBER(1);

UPDATE ZFAG SET ZFAG_IGNOREFISCAL=0 WHERE ZFAG_IGNOREFISCAL IS NULL;

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

COMMENT ON COLUMN MMOD.MMOD_CHK_AVL_TENT IS 'indicates whether tentative values for room type availability check is used';

ALTER TABLE MMOD ADD (MMOD_XCAC_ID NUMBER(30,0) NULL);

COMMENT ON COLUMN MMOD.MMOD_XCAC_ID IS 'Default child categorie for rate code down and upload';

ALTER TABLE MBIL ADD (MBIL_BITYPE NUMBER(1,0) NULL);

COMMENT ON COLUMN MBIL.MBIL_BITYPE IS '1 = Same Room';

