--UPDATE FROM 8.6.0.5 TO 8.6.0.6


DROP TABLE VERSION_8_6_0_5;



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


ALTER TABLE YRES ADD ( YRES_SALEDATE DATE NULL  );

UPDATE YRES SET YRES_SALEDATE=(SELECT TRUNC(WMLG_TIME_CREATION) FROM WMLG WHERE WMLG_TABLENAME='YRES' AND WMLG_TABLE_ID=YRES_ID AND ROWNUM=1) WHERE YRES_SALEDATE IS NULL;

ALTER TABLE YLPR ADD ( YLPR_AMOUNT NUMBER(30,4) NULL  );

ALTER TABLE YLPR ADD ( YLPR_FOREIGNAMOUNT NUMBER(30,4) NULL  );

ALTER TABLE YPRD ADD ( YPRD_STARTBOOKING DATE NULL  );

ALTER TABLE YPRD ADD ( YPRD_ENDBOOKING DATE NULL  );

UPDATE YPRD SET YPRD.YPRD_STARTBOOKING=(SELECT YPRM.YPRM_STARTDATE FROM YPRM WHERE YPRM.YPRM_ID=YPRD.YPRD_YPRM_ID),
YPRD.YPRD_ENDBOOKING=(SELECT YPRM.YPRM_ENDDATE FROM YPRM WHERE YPRM.YPRM_ID=YPRD.YPRD_YPRM_ID) WHERE YPRD.YPRD_STARTBOOKING IS NULL 
AND YPRD.YPRD_ENDBOOKING IS NULL;

ALTER TABLE ZIXC ADD ( ZIXC_RATE_TYPE NUMBER(1) NULL  );
