--UPDATE FROM 8.6.0.9 TO 8.6.0.10


DROP TABLE VERSION_8_6_0_9;



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


ALTER TABLE SMAN ADD ( SMAN_ARRCHILDSTOMORROW_D NUMBER(5) NULL  );

ALTER TABLE SMAN ADD ( SMAN_DEPCHILDSTOMORROW_D NUMBER(5) NULL  );

ALTER TABLE SMAD ADD ( SMAD_ARRCHILDSTOMORROW_D NUMBER(5) NULL  );

ALTER TABLE SMAD ADD ( SMAD_DEPCHILDSTOMORROW_D NUMBER(5) NULL  );

ALTER TABLE SMRT ADD ( SMRT_ARRCHILDSTOMORROW_D NUMBER(5) NULL  );

ALTER TABLE SMRT ADD ( SMRT_DEPCHILDSTOMORROW_D NUMBER(5) NULL  );

ALTER TABLE SMAN ADD ( SMAN_HOUSEUSE_ADULTS_D NUMBER(5) NULL  );

ALTER TABLE SMAN ADD ( SMAN_HOUSEUSE_ADULTS_M NUMBER(5) NULL  );

ALTER TABLE SMAN ADD ( SMAN_HOUSEUSE_ADULTS_Y NUMBER(7) NULL  );

ALTER TABLE SMAN ADD ( SMAN_WALKIN_ADULTS_D NUMBER(5) NULL  );

ALTER TABLE SMAN ADD ( SMAN_WALKIN_ADULTS_M NUMBER(5) NULL  );

ALTER TABLE SMAN ADD ( SMAN_WALKIN_ADULTS_Y NUMBER(7) NULL  );

ALTER TABLE SMAN ADD ( SMAN_DAYUSE_ADULTS_D NUMBER(5) NULL  );

ALTER TABLE SMAN ADD ( SMAN_DAYUSE_ADULTS_M NUMBER(5) NULL  );

ALTER TABLE SMAN ADD ( SMAN_DAYUSE_ADULTS_Y NUMBER(7) NULL  );

UPDATE SMAN SET SMAN_HOUSEUSE_ADULTS_D = 0 WHERE SMAN_HOUSEUSE_ADULTS_D IS NULL;

UPDATE SMAN SET SMAN_HOUSEUSE_ADULTS_M = 0 WHERE SMAN_HOUSEUSE_ADULTS_M IS NULL;

UPDATE SMAN SET SMAN_HOUSEUSE_ADULTS_Y = 0 WHERE SMAN_HOUSEUSE_ADULTS_Y IS NULL;

UPDATE SMAN SET SMAN_WALKIN_ADULTS_D  = 0 WHERE SMAN_WALKIN_ADULTS_D  IS NULL;

UPDATE SMAN SET SMAN_WALKIN_ADULTS_M  = 0 WHERE SMAN_WALKIN_ADULTS_M  IS NULL;

UPDATE SMAN SET SMAN_WALKIN_ADULTS_Y  = 0 WHERE SMAN_WALKIN_ADULTS_Y  IS NULL;

UPDATE SMAN SET SMAN_DAYUSE_ADULTS_D  = 0 WHERE SMAN_DAYUSE_ADULTS_D  IS NULL;

UPDATE SMAN SET SMAN_DAYUSE_ADULTS_M  = 0 WHERE SMAN_DAYUSE_ADULTS_M  IS NULL;

UPDATE SMAN SET SMAN_DAYUSE_ADULTS_Y  = 0 WHERE SMAN_DAYUSE_ADULTS_Y  IS NULL;

ALTER TABLE SMRT ADD ( SMRT_HOUSEUSE_ADULTS_D NUMBER(5) NULL  );

ALTER TABLE SMRT ADD ( SMRT_HOUSEUSE_ADULTS_M NUMBER(5) NULL  );

ALTER TABLE SMRT ADD ( SMRT_HOUSEUSE_ADULTS_Y NUMBER(7) NULL  );

ALTER TABLE SMRT ADD ( SMRT_WALKIN_ADULTS_D NUMBER(5) NULL  );

ALTER TABLE SMRT ADD ( SMRT_WALKIN_ADULTS_M NUMBER(5) NULL  );

ALTER TABLE SMRT ADD ( SMRT_WALKIN_ADULTS_Y NUMBER(7) NULL  );

ALTER TABLE SMRT ADD ( SMRT_DAYUSE_ADULTS_D NUMBER(5) NULL  );

ALTER TABLE SMRT ADD ( SMRT_DAYUSE_ADULTS_M NUMBER(5) NULL  );

ALTER TABLE SMRT ADD ( SMRT_DAYUSE_ADULTS_Y NUMBER(7) NULL  );

UPDATE SMRT SET SMRT_HOUSEUSE_ADULTS_D = 0 WHERE SMRT_HOUSEUSE_ADULTS_D IS NULL;

UPDATE SMRT SET SMRT_HOUSEUSE_ADULTS_M = 0 WHERE SMRT_HOUSEUSE_ADULTS_M IS NULL;

UPDATE SMRT SET SMRT_HOUSEUSE_ADULTS_Y = 0 WHERE SMRT_HOUSEUSE_ADULTS_Y IS NULL;

UPDATE SMRT SET SMRT_WALKIN_ADULTS_D  = 0 WHERE SMRT_WALKIN_ADULTS_D  IS NULL;

UPDATE SMRT SET SMRT_WALKIN_ADULTS_M  = 0 WHERE SMRT_WALKIN_ADULTS_M  IS NULL;

UPDATE SMRT SET SMRT_WALKIN_ADULTS_Y  = 0 WHERE SMRT_WALKIN_ADULTS_Y  IS NULL;

UPDATE SMRT SET SMRT_DAYUSE_ADULTS_D  = 0 WHERE SMRT_WALKIN_ADULTS_D  IS NULL;

UPDATE SMRT SET SMRT_DAYUSE_ADULTS_M  = 0 WHERE SMRT_WALKIN_ADULTS_M  IS NULL;

UPDATE SMRT SET SMRT_DAYUSE_ADULTS_Y  = 0 WHERE SMRT_WALKIN_ADULTS_Y  IS NULL;

ALTER TABLE MMOD ADD ( MMOD_WDAYS_OFFSET NUMBER(1) NULL  );

ALTER TABLE MMOD ADD ( MMOD_VAT NUMBER(5,2) NULL  );

UPDATE MCNV SET MCNV_PMS_DEFAULT=1 WHERE NVL(MCNV_PMS_DEFAULT,0)=0;

UPDATE ZPOS SET ZPOS_LEDGERSTATUS=3 WHERE ZPOS_ZDCO_ID=(SELECT WUSS_VALUE FROM WUSS WHERE WUSS_NAME='ARInternalPostingDept' AND WUSS_XCMS_ID=0) AND ZPOS_LEDGERSTATUS=4;
