--UPDATE FROM 8.12.0.2 TO 8.12.1.0


 	
DROP TABLE VERSION_8_12_0_2;


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


ALTER TABLE ZFCF ADD ZFCF_DEP_TIMESTAMP DATE;

COMMENT ON COLUMN ZFCF.ZFCF_DEP_TIMESTAMP IS 'the timestamp sent in the response';

ALTER TABLE ZOTA ADD ZOTA_USE_OOO_MSG NUMBER(1);

COMMENT ON COLUMN ZOTA.ZOTA_USE_OOO_MSG IS 'indicates whether only OOO are send or complete availability of room type';

comment on column xcms.xcms_active is '1 = Yes | 0 = No | 3 = Terminated (emplyoees) | 4 = Merged | 5 = Anonymized | 6= NonCommitted';

delete from xpdt where exists (select 1 from xcms where xcms_id=xpdt_xcms_id and xcms_active=5);

delete from xpdt where exists (select 1 from xcms where xcms_id=xpdt_other_xcms_id and xcms_active=5);

create table wdct 
(
wdct_id number (10,0) not null,
wdct_wdcg_id number (10,0) not null,
wdct_extension varchar2(10) not null,  
wdct_application varchar2 (300)
) tablespace v8main;

ALTER TABLE wdct ADD CONSTRAINT wdct_PK PRIMARY KEY (wdct_ID) using index tablespace v8index;

create sequence seq_wcdt increment by 1 start with 1000 nomaxvalue nocycle nocache noorder;

comment on table wdct is 'Document Types Config table';

comment on column wdct.wdct_wdcg_id is 'Document Group Link';

comment on column wdct.wdct_extension is 'Document Type specified by it''s extension';

comment on column wdct.wdct_application is 'Application path and executable which should be used to open,execute the specific document type';
