--UPDATE FROM 8.8.0.0 TO 8.8.0.1


DROP TABLE VERSION_8_8_0_0;



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

ALTER TABLE YPOS ADD YPOS_GROSSUNITPRICE NUMBER(30,4);

UPDATE YPOS Y SET YPOS_GROSSUNITPRICE=(SELECT SUM(YPOS_UNITPRICE) FROM YPOS YY WHERE YY.YPOS_TAXLINK_ID=Y.YPOS_TAXLINK_ID) WHERE YPOS_DT=1;

ALTER TABLE ZPOS ADD ZPOS_XCAC_ID NUMBER(30);

COMMENT ON COLUMN ZPOS.ZPOS_XCAC_ID IS 'ID of child age category in case multi guest and rate amount per guest is used, for reporting purpose only ';

ALTER TABLE YPRR ADD YPRR_ZDCO_ID NUMBER(30);

ALTER TABLE YFSC ADD YFSC_FREETEXT VARCHAR2(1000);

COMMENT ON COLUMN YFSC.YFSC_FREETEXT IS 'Free text';

ALTER TABLE YFSC ADD YFSC_PICTURE LONG RAW;

COMMENT ON COLUMN YFSC.YFSC_PICTURE IS 'Picture';

ALTER TABLE YSSL ADD YSSL_FREETEXT VARCHAR2(1000);

COMMENT ON COLUMN YSSL.YSSL_FREETEXT IS 'Free text';

ALTER TABLE YSSL ADD YSSL_PICTURE LONG RAW;

COMMENT ON COLUMN YSSL.YSSL_PICTURE IS 'Picture';

ALTER TABLE ZDCO ADD ZDCO_XCHFEE_MULTIPLYBYCHEQUES NUMBER(1);

COMMENT ON COLUMN ZDCO.ZDCO_XCHFEE_MULTIPLYBYCHEQUES IS 'Multiply by Number of Cheques when flatrate fee is set';

ALTER TABLE YCAD ADD YCAD_WEEKDAY_WCOL_ID NUMBER(30);

ALTER TABLE YCAD ADD YCAD_WEEKEND_WCOL_ID NUMBER(30);

ALTER TABLE YCAD ADD YCAD_EMAIL VARCHAR2(30);

COMMENT ON COLUMN YCAD.YCAD_EMAIL IS 'sender email per hotel segment';

ALTER TABLE WRPS ADD WRPS_YCAD_ID NUMBER(30);

COMMENT ON COLUMN WRPS.WRPS_YCAD_ID IS 'Link report section to the hotel segment';

ALTER TABLE YGRT ADD YGRT_YCAD_ID NUMBER (30);

COMMENT ON COLUMN YGRT.YGRT_YCAD_ID IS 'Hotel segmentation link';

ALTER TABLE YGRP ADD YGRP_YCAD_ID NUMBER (30);

COMMENT ON COLUMN YGRP.YGRP_YCAD_ID IS 'Hotel segmentation link';

DROP VIEW V8_CCM_PRODUCTION;

CREATE TABLE ZTAP 
  (ZTAP_ID       		NUMBER(30) NOT NULL
  ,ZTAP_ZTAA_ID  		NUMBER(30) NOT NULL
  ,ZTAP_ZTAK_ID  		NUMBER(30) NOT NULL
  ,ZTAP_CUSTOMER_ZDCO_ID  	NUMBER(30) NULL
  ,ZTAP_MASTER_ZDCO_ID  	NUMBER(30) NULL
  ,ZTAP_VALUE 	 		NUMBER(30,4) NOT NULL
  ,CONSTRAINT ZTAP_PK PRIMARY KEY (ZTAP_ID) USING INDEX TABLESPACE V8INDEX) TABLESPACE V8CONF;
  
CREATE SEQUENCE SEQ_ZTAP INCREMENT BY 1 START WITH 1000 NOMAXVALUE NOCYCLE NOCACHE NOORDER;

ALTER TABLE XCED MODIFY XCED_BADLOGIN NUMBER(5);
