--UPDATE FROM 8.10.2.30 TO 8.10.2.40


 	
DROP TABLE VERSION_8_10_2_30;


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


alter table xcms add xcms_StorePrivateData number(1) default 0 not null;

comment on column xcms.xcms_StorePrivateData is '0=Normal (anonymize after configured period), 1=Permanent storage, 2= Anonymize as soon as possible';

alter table xcms add xcms_DeletePrivateData date;

alter table xcms add xcms_DeletePrivateDataBatch number;

create table wdbo (
    wdbo_id number(30) not null
   ,wdbo_name varchar2(100) not null
   ,wdbo_type varchar2(20) not null
   ,wdbo_last_ddl_time date not null
   ,wdbo_timestamp varchar2(30)
   ,wdbo_status varchar2(10) not null
   ,wdbo_hash varchar2(100) not null
   ,wdbo_signed_employee_xcms_id number(30) not null
   ,wdbo_signed_timestamp date not null
   ,wdbo_text clob
   ,wdbo_textHash varchar2(100)
   ,constraint wdbo_pk primary key (wdbo_id) using index tablespace v8index
) tablespace v8Large;  

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

alter table xced add xced_wusrHash varchar2(60);

alter table wegr add wegr_wusrHash varchar2(60);

create table wail (
   wail_id number(30) not null
  ,wail_name varchar2(30) not null
  ,constraint wail_pk primary key (wail_id) using index tablespace v8index
  ,constraint wail_name_unique unique (wail_name) using index tablespace v8index
) tablespace v8main;
  
comment on table wail is 'Guest anonymization ignore list: field names and table names';

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

COMMENT ON COLUMN XCMS.XCMS_ACTIVE is '1 = Yes | 0 = No | 3 = Terminated (emplyoees) | 4 = Merged | 5 = Anonymized';




