-- =======================================================================
--   DBMS name:      IBM DB2                                              
--   Version:        8.1 or higher                                        
--   Notes:          Require user tablespace pagesize 16k at least        
--   Created on:     2016-05-16                                           
-- =======================================================================

-- =======================================================================
--   system database                                                      
-- =======================================================================
DROP TABLE CFG_PROPS_2;
DROP TABLE GLOBAL_NLS_FONT_1;
DROP TABLE GLOBAL_NLS_FORMAT_1;
DROP TABLE GLOBAL_NLS_TEXT_1;
DROP TABLE MEMBERS;
DROP TABLE RESOURCE_LOCK;
DROP TABLE TBL_DUAL_JINFONET;
DROP TABLE TBL_IDGENRATOR_JINFONET;
DROP TABLE TBL_LOCK_JINFONET;
DROP TABLE UPDATEDETAILS_1;
CREATE TABLE CFG_PROPS_2(PROP_NAME VARCHAR(128) NOT NULL,PROP_KEY VARCHAR(512) NOT NULL,PROP_VALUE VARCHAR(512),IS_LOB SMALLINT NOT NULL,LOB_VAL BLOB, PRIMARY KEY(PROP_NAME,PROP_KEY));
CREATE TABLE GLOBAL_NLS_FONT_1(LOC VARCHAR(10) NOT NULL,ORG_FACE VARCHAR(20) NOT NULL,ORG_SIZE INTEGER NOT NULL,TAR_FACE VARCHAR(20) NOT NULL,TAR_SIZE INTEGER NOT NULL,IS_RELATIVE SMALLINT NOT NULL, PRIMARY KEY(LOC,ORG_FACE,ORG_SIZE));
CREATE TABLE GLOBAL_NLS_FORMAT_1(LOC VARCHAR(10) NOT NULL,KEY_FORMAT VARCHAR(255) NOT NULL,VALUE_FORMAT VARCHAR(512) NOT NULL, PRIMARY KEY(LOC,KEY_FORMAT));
CREATE TABLE GLOBAL_NLS_TEXT_1(LOC VARCHAR(10) NOT NULL,NLS_TYPE INTEGER NOT NULL,KEY_TEXT VARCHAR(255) NOT NULL,VALUE_TEXT VARCHAR(512) NOT NULL, PRIMARY KEY(LOC,NLS_TYPE,KEY_TEXT));
CREATE TABLE MEMBERS(MEMBER_ID INTEGER NOT NULL,RMI_HOST VARCHAR(32) NOT NULL,RMI_PORT INTEGER NOT NULL, PRIMARY KEY(MEMBER_ID));
CREATE TABLE RESOURCE_LOCK(LOCK_NAME VARCHAR(512) NOT NULL, PRIMARY KEY(LOCK_NAME));
CREATE TABLE TBL_DUAL_JINFONET(DUAL_COL SMALLINT NOT NULL);
CREATE TABLE TBL_IDGENRATOR_JINFONET(TF_NAME VARCHAR(64) NOT NULL,NEXT_ID INTEGER NOT NULL, PRIMARY KEY(TF_NAME));
CREATE TABLE TBL_LOCK_JINFONET(LOCK_NAME VARCHAR(255) NOT NULL, PRIMARY KEY(LOCK_NAME));
CREATE TABLE UPDATEDETAILS_1(UPDATE_ITEM VARCHAR(32) NOT NULL,UPDATE_STATE SMALLINT NOT NULL, PRIMARY KEY(UPDATE_ITEM));

-- =======================================================================
--   profile database                                                     
-- =======================================================================
DROP TABLE RESOURCE_LOCK;
DROP TABLE TASKAUDIT;
DROP TABLE TASKCONTEXT_2;
DROP TABLE TBL_DUAL_JINFONET;
DROP TABLE TBL_IDGENRATOR_JINFONET;
DROP TABLE TBL_LOCK_JINFONET;
DROP TABLE UPDATEDETAILS_1;
CREATE TABLE RESOURCE_LOCK(LOCK_NAME VARCHAR(512) NOT NULL, PRIMARY KEY(LOCK_NAME));
CREATE TABLE TASKAUDIT(ID INTEGER NOT NULL,TASK_ID VARCHAR(128),REPORT_NAME VARCHAR(256),CATALOG_NAME VARCHAR(256),CATALOG_NAMES BLOB,USER_NAME VARCHAR(128),TASK_TYPE INTEGER,TASK_STATUS INTEGER,PAGE_NUMBER INTEGER,RUN_TIMES INTEGER,SUBMIT_TIME BIGINT,START_TIME BIGINT,COMPLETE_TIME BIGINT,FAIL_REASON VARCHAR(256),PARAMETERS BLOB, PRIMARY KEY(ID));
CREATE TABLE TASKCONTEXT_2(ID INTEGER NOT NULL,VS_RPT_NAME VARCHAR(255),VI_TSK_TYPE INTEGER,VI_TSK_STATUS INTEGER,TS_TSK_SUBMIT TIMESTAMP,TS_ENG_START TIMESTAMP,TS_ENG_EXITS TIMESTAMP,TS_TSK_COMPLETE TIMESTAMP,TC_TSK_TOTAL BIGINT,TC_TSK_WAITED BIGINT,TC_ENG_TOTAL BIGINT,TC_ENG_LOAD BIGINT,TC_ENG_EXPORT BIGINT,TC_ENG_OTHER BIGINT,TC_TSK_OTHER BIGINT,NC_RPT_PAGES BIGINT,NC_RPT_FORMATS BIGINT,NC_ENG_CONCURRENT BIGINT,NC_QUE_LENGTH BIGINT,TASK_TYPE VARCHAR(16), PRIMARY KEY(ID));
CREATE TABLE TBL_DUAL_JINFONET(DUAL_COL SMALLINT NOT NULL);
CREATE TABLE TBL_IDGENRATOR_JINFONET(TF_NAME VARCHAR(64) NOT NULL,NEXT_ID INTEGER NOT NULL, PRIMARY KEY(TF_NAME));
CREATE TABLE TBL_LOCK_JINFONET(LOCK_NAME VARCHAR(255) NOT NULL, PRIMARY KEY(LOCK_NAME));
CREATE TABLE UPDATEDETAILS_1(UPDATE_ITEM VARCHAR(32) NOT NULL,UPDATE_STATE SMALLINT NOT NULL, PRIMARY KEY(UPDATE_ITEM));

-- =======================================================================
--   realm database                                                       
-- =======================================================================
DROP TABLE ACLENTRIES_3;
DROP TABLE ACLS_2;
DROP TABLE ACLS_WITH_RESOURCE_1;
DROP TABLE ALIASES_2;
DROP TABLE ALIAS_MAPPING;
DROP TABLE ALIAS_MAPPING_KEY;
DROP TABLE CATALOGVERSION_4;
DROP TABLE CFG_PROPS_2;
DROP TABLE COMPLETEDPUBLISHTABLE_2;
DROP TABLE COMPLETEDRESULTTABLE_3;
DROP TABLE COMPLETEDTABLE_4;
DROP TABLE JR_QRTZ_TRIGGER_LISTENERS;
DROP TABLE JR_QRTZ_SIMPLE_TRIGGERS;
DROP TABLE JR_QRTZ_JOB_LISTENERS;
DROP TABLE JR_QRTZ_CRON_TRIGGERS;
DROP TABLE JR_QRTZ_BLOB_TRIGGERS;
DROP TABLE JR_QRTZ_TRIGGERS;
DROP TABLE JR_QRTZ_JOB_DETAILS;
DROP TABLE DYN_BVELE_NAME_MAPPING_1;
DROP TABLE DYN_BVELE_NAME_1;
DROP TABLE DYNAMIC_CONNECTIONS_MAPPING_2;
DROP TABLE DYNAMIC_CONNECTIONS_2;
DROP TABLE DASHBOARDLISTENERTARGET_1;
DROP TABLE DASHBOARDLISTENER_1;
DROP TABLE CRD_CONN_INFO_1;
DROP TABLE CRDRUNDETAIL_1;
DROP TABLE CRD_INFO_5;
DROP TABLE COMP_CRD_CONN_INFO_1;
DROP TABLE COMPLETED_CRD_INFO_3;
DROP TABLE CUSTOM_FIELD_1;
DROP TABLE CUSTOM_FIELD_VALUE_1;
DROP TABLE DRESULT_3;
DROP TABLE DYNAMICNODE_5;
DROP TABLE DYNAMICRESULT_2;
DROP TABLE DYN_SECURITY_1;
DROP TABLE EXTENDACLENTRIES_3;
DROP TABLE FOLDERS_4;
DROP TABLE GROUPPROFILES_2;
DROP TABLE GROUPS_3;
DROP TABLE GUPROFILES_3;
DROP TABLE HISTORY_PARAMLIST_TABLE_1;
DROP TABLE JR_QRTZ_CALENDARS;
DROP TABLE JR_QRTZ_FIRED_TRIGGERS;
DROP TABLE JR_QRTZ_LOCKS;
DROP TABLE JR_QRTZ_PAUSED_TRIGGER_GRPS;
DROP TABLE JR_QRTZ_SCHEDULER_STATE;
DROP TABLE LCVERSION_2;
DROP TABLE NODES_6;
DROP TABLE ORGANIZATIONS_1;
DROP TABLE REPORTVERSION_4;
DROP TABLE RESOURCEMAP_2;
DROP TABLE RESOURCENLS_1;
DROP TABLE RESOURCENODES_5;
DROP TABLE RESOURCE_LOCK;
DROP TABLE RESULTVERSION_3;
DROP TABLE RESULT_3;
DROP TABLE RGPROFILES_2;
DROP TABLE ROLEPROFILES_3;
DROP TABLE ROLES_4;
DROP TABLE SCHDLASTEXETIME_1;
DROP TABLE STORAGE_MEMBER_1;
DROP TABLE STORAGE_RESOURCE_1;
DROP TABLE TBL_DUAL_JINFONET;
DROP TABLE TBL_IDGENRATOR_JINFONET;
DROP TABLE TBL_LOCK_JINFONET;
DROP TABLE TRIGGERS_1;
DROP TABLE UPDATEDETAILS_1;
DROP TABLE USERPROFILES_4;
DROP TABLE USERS_4;
DROP TABLE VERSIONNODES_3;
CREATE TABLE ACLENTRIES_3(ENTRY_ID INTEGER NOT NULL,ACL_ID INTEGER NOT NULL,PRINCIPAL_TYPE SMALLINT NOT NULL,PRINCIPAL_NAME VARCHAR(256) NOT NULL,IS_POSITIVE SMALLINT NOT NULL,PERMISSIONS INTEGER NOT NULL, PRIMARY KEY(ENTRY_ID));
CREATE TABLE ACLS_2(ID INTEGER NOT NULL,NAME VARCHAR(64) NOT NULL,CREATE_NAME VARCHAR(32) NOT NULL,CREATE_TIME BIGINT, PRIMARY KEY(ID));
CREATE TABLE ACLS_WITH_RESOURCE_1(ID INTEGER NOT NULL,RESOURCE_PATH VARCHAR(256) NOT NULL,VERSION_NUMBER INTEGER NOT NULL,ACL_NAME VARCHAR(512) NOT NULL,CREATE_NAME VARCHAR(32) NOT NULL,CREATE_TIME BIGINT, PRIMARY KEY(ID));
CREATE TABLE ALIASES_2(ID INTEGER NOT NULL,PRINCIPAL_NAME VARCHAR(256) NOT NULL,PRINCIPAL_TYPE SMALLINT NOT NULL,ALIAS_NAME VARCHAR(256) NOT NULL,PARENT_NAME VARCHAR(256),MAP_RESOURCE VARCHAR(256) NOT NULL,HIDDEN SMALLINT NOT NULL, UNIQUE(ID));
CREATE TABLE ALIAS_MAPPING(KEY_ID INTEGER NOT NULL,FIELD_TYPE INTEGER NOT NULL,FIELD_SIGNATURE VARCHAR(32) NOT NULL,FIELD_CATLOG VARCHAR(256) NOT NULL,FIELD_DATASOURCE VARCHAR(256) NOT NULL,FIELD_QUERY VARCHAR(256) NOT NULL,FIELD_DETAILS BLOB NOT NULL, PRIMARY KEY(KEY_ID,FIELD_TYPE,FIELD_SIGNATURE));
CREATE TABLE ALIAS_MAPPING_KEY(ID INTEGER NOT NULL,MAPPING_KEY VARCHAR(256) NOT NULL, PRIMARY KEY(ID), UNIQUE(MAPPING_KEY));
CREATE TABLE CATALOGVERSION_4(VERSIONNUMBER INTEGER NOT NULL,VERSIONNAME VARCHAR(128),RESOURCEID INTEGER NOT NULL,CREATOR VARCHAR(128),CREATEDTIME BIGINT NOT NULL,MODIFIER VARCHAR(128),MODIFIEDTIME BIGINT NOT NULL,CATALOGFILE VARCHAR(512) NOT NULL,ID BIGINT NOT NULL,DISKSIZE BIGINT, UNIQUE(ID));
CREATE TABLE CFG_PROPS_2(PROP_NAME VARCHAR(128) NOT NULL,PROP_KEY VARCHAR(512) NOT NULL,PROP_VALUE VARCHAR(512),IS_LOB SMALLINT NOT NULL,LOB_VAL BLOB, PRIMARY KEY(PROP_NAME,PROP_KEY));
CREATE TABLE COMPLETEDPUBLISHTABLE_2(ID INTEGER NOT NULL,RECORDID VARCHAR(40) NOT NULL,SHEETNAME VARCHAR(256) NOT NULL,DISPLAYNAME VARCHAR(256),PUB_TYPE VARCHAR(64) NOT NULL);
CREATE TABLE COMPLETEDRESULTTABLE_3(PUBLISHID INTEGER NOT NULL,RECORDID VARCHAR(40) NOT NULL,PUB_TYPE VARCHAR(128) NOT NULL,STATUS INTEGER NOT NULL,DETAIL VARCHAR(256) NOT NULL);
CREATE TABLE COMPLETEDTABLE_4(ID INTEGER NOT NULL,RECORDID VARCHAR(128),TASKID VARCHAR(128) NOT NULL,TASKCLASS VARCHAR(256) NOT NULL,CATFILE VARCHAR(256),RPTFILE VARCHAR(256),PARAMFILE VARCHAR(256),RESULTFILE VARCHAR(1024),ERROR VARCHAR(256),ENGMSG VARCHAR(512),SUBMITTER VARCHAR(128),COMPLETEDTIME BIGINT,FORMATEXISTS INTEGER,FORMATSUCCESSFUL INTEGER,VERSIONID INTEGER,LAUNCHTYPE INTEGER,ISSUCCESSFUL SMALLINT NOT NULL,TASKNAME VARCHAR(128),ISMISSED SMALLINT NOT NULL,SCHEDULETRIGGER VARCHAR(80),CONDITIONSLOGIC VARCHAR(16),REPORTNAMES VARCHAR(512));
CREATE TABLE COMPLETED_CRD_INFO_3(ID INTEGER NOT NULL,SVERSION INTEGER,CATALOGID INTEGER,CATALOGPATH VARCHAR(255),DATASOURCE VARCHAR(255),QUERYTYPE INTEGER,QUERYNAME VARCHAR(255),LASTMODIFIED BIGINT,USERNAME VARCHAR(255),PWD VARCHAR(255),PARAMFILE VARCHAR(255),LAZY INTEGER,CATALOGVERSION INTEGER,CATALOGLASTMODIFIED BIGINT,STARTTIME BIGINT,COMPLETEDTIME BIGINT,SUCC INTEGER,BVNAME VARCHAR(255),ACTIVITYTYPE SMALLINT,MESSAGE VARCHAR(512), UNIQUE(ID));
CREATE TABLE COMP_CRD_CONN_INFO_1(ID INTEGER,CONNNAME VARCHAR(256),USERNAME VARCHAR(256),PWD VARCHAR(256), FOREIGN KEY (ID) REFERENCES COMPLETED_CRD_INFO_3(ID));
CREATE TABLE CRD_INFO_5(ID INTEGER NOT NULL,SVERSION INTEGER,CATALOGID INTEGER,CATALOGPATH VARCHAR(255),DATASOURCE VARCHAR(255),QUERYTYPE INTEGER,QUERYNAME VARCHAR(255),LASTMODIFIED BIGINT,USERNAME VARCHAR(255),PWD VARCHAR(255),PARAMFILE VARCHAR(255),LAZY INTEGER,RESULTVERSION INTEGER,CATALOGVERSION INTEGER,CATALOGLASTMODIFIED BIGINT,TASKID VARCHAR(255),CONFIGFILE VARCHAR(255),LOGINUSER VARCHAR(255),CACHETYPE INTEGER,BVNAME VARCHAR(255),STATUS SMALLINT,CREATETIME BIGINT,MAXMEMORY DOUBLE,FLAGS INTEGER,LOCATION SMALLINT, UNIQUE(ID));
CREATE TABLE CRDRUNDETAIL_1(ID INTEGER,ACTIVITY SMALLINT,STARTTIME BIGINT,ENDTIME BIGINT,SUCC SMALLINT, FOREIGN KEY (ID) REFERENCES CRD_INFO_5(ID));
CREATE TABLE CRD_CONN_INFO_1(ID INTEGER,CONNNAME VARCHAR(256),USERNAME VARCHAR(256),PWD VARCHAR(256), FOREIGN KEY (ID) REFERENCES CRD_INFO_5(ID));
CREATE TABLE DASHBOARDLISTENER_1(CLASSNAME VARCHAR(512) NOT NULL,DESCRIPTION VARCHAR(255),ENABLED SMALLINT NOT NULL,CREATETIME BIGINT, PRIMARY KEY(CLASSNAME));
CREATE TABLE DASHBOARDLISTENERTARGET_1(CLASSNAME VARCHAR(512),TARGET VARCHAR(512),APPLYTIME BIGINT, FOREIGN KEY (CLASSNAME) REFERENCES DASHBOARDLISTENER_1(CLASSNAME));
CREATE TABLE DYNAMIC_CONNECTIONS_2(CONN_ID INTEGER NOT NULL,ORG_NAME VARCHAR(256),CATALOG VARCHAR(512) NOT NULL,DATASOURCRE VARCHAR(256) NOT NULL,CONNECTION_NAME VARCHAR(256),CONN_PROPERTIES BLOB, PRIMARY KEY(CONN_ID));
CREATE TABLE DYNAMIC_CONNECTIONS_MAPPING_2(CONN_ID INTEGER NOT NULL,PRINCIPAL VARCHAR(512) NOT NULL,PRINCIPAL_TYPE VARCHAR(64) NOT NULL,DB_USER VARCHAR(256),DB_PASSWORD VARCHAR(256), PRIMARY KEY(CONN_ID,PRINCIPAL,PRINCIPAL_TYPE), FOREIGN KEY (CONN_ID) REFERENCES DYNAMIC_CONNECTIONS_2(CONN_ID));
CREATE TABLE DYN_BVELE_NAME_1(ID INTEGER NOT NULL,ORG_NAME VARCHAR(256),CATALOG VARCHAR(512) NOT NULL,PRINCIPAL_NAME VARCHAR(512),PRINCIPAL_TYPE VARCHAR(64) NOT NULL, PRIMARY KEY(ID));
CREATE TABLE DYN_BVELE_NAME_MAPPING_1(ID INTEGER NOT NULL,QUALIFIED_NAME VARCHAR(512) NOT NULL,DISPLAY_NAME VARCHAR(128) NOT NULL, FOREIGN KEY (ID) REFERENCES DYN_BVELE_NAME_1(ID));
CREATE TABLE JR_QRTZ_JOB_DETAILS(JOB_NAME VARCHAR(200) NOT NULL,JOB_GROUP VARCHAR(200) NOT NULL,DESCRIPTION VARCHAR(250),JOB_CLASS_NAME VARCHAR(250) NOT NULL,IS_DURABLE SMALLINT NOT NULL,IS_VOLATILE SMALLINT NOT NULL,IS_STATEFUL SMALLINT NOT NULL,REQUESTS_RECOVERY SMALLINT NOT NULL,JOB_DATA BLOB, PRIMARY KEY(JOB_NAME,JOB_GROUP));
CREATE TABLE JR_QRTZ_TRIGGERS(TRIGGER_NAME VARCHAR(200) NOT NULL,TRIGGER_GROUP VARCHAR(200) NOT NULL,JOB_NAME VARCHAR(200) NOT NULL,JOB_GROUP VARCHAR(200) NOT NULL,IS_VOLATILE SMALLINT NOT NULL,DESCRIPTION VARCHAR(250),NEXT_FIRE_TIME BIGINT NOT NULL,PREV_FIRE_TIME BIGINT NOT NULL,PRIORITY INTEGER NOT NULL,TRIGGER_STATE VARCHAR(16) NOT NULL,TRIGGER_TYPE VARCHAR(8) NOT NULL,START_TIME BIGINT NOT NULL,END_TIME BIGINT,CALENDAR_NAME VARCHAR(200),MISFIRE_INSTR SMALLINT,JOB_DATA BLOB, PRIMARY KEY(TRIGGER_NAME,TRIGGER_GROUP), FOREIGN KEY (JOB_NAME,JOB_GROUP) REFERENCES JR_QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP));
CREATE TABLE JR_QRTZ_BLOB_TRIGGERS(TRIGGER_NAME VARCHAR(200) NOT NULL,TRIGGER_GROUP VARCHAR(200) NOT NULL,BLOB_DATA BLOB, PRIMARY KEY(TRIGGER_NAME,TRIGGER_GROUP), FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES JR_QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP));
CREATE TABLE JR_QRTZ_CRON_TRIGGERS(TRIGGER_NAME VARCHAR(200) NOT NULL,TRIGGER_GROUP VARCHAR(200) NOT NULL,CRON_EXPRESSION VARCHAR(120) NOT NULL,TIME_ZONE_ID VARCHAR(80), PRIMARY KEY(TRIGGER_NAME,TRIGGER_GROUP), FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES JR_QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP));
CREATE TABLE JR_QRTZ_JOB_LISTENERS(JOB_NAME VARCHAR(200) NOT NULL,JOB_GROUP VARCHAR(200) NOT NULL,JOB_LISTENER VARCHAR(200) NOT NULL, PRIMARY KEY(JOB_NAME,JOB_GROUP,JOB_LISTENER), FOREIGN KEY (JOB_NAME,JOB_GROUP) REFERENCES JR_QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP));
CREATE TABLE JR_QRTZ_SIMPLE_TRIGGERS(TRIGGER_NAME VARCHAR(200) NOT NULL,TRIGGER_GROUP VARCHAR(200) NOT NULL,REPEAT_COUNT BIGINT NOT NULL,REPEAT_INTERVAL BIGINT NOT NULL,TIMES_TRIGGERED BIGINT NOT NULL, PRIMARY KEY(TRIGGER_NAME,TRIGGER_GROUP), FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES JR_QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP));
CREATE TABLE JR_QRTZ_TRIGGER_LISTENERS(TRIGGER_NAME VARCHAR(200) NOT NULL,TRIGGER_GROUP VARCHAR(200) NOT NULL,TRIGGER_LISTENER VARCHAR(200) NOT NULL, PRIMARY KEY(TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER), FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES JR_QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP));
CREATE TABLE CUSTOM_FIELD_1(ID INTEGER NOT NULL,SVERSION INTEGER,ENABLED INTEGER,NAME VARCHAR(255) NOT NULL,DESCRIPTION VARCHAR(256), UNIQUE(ID,NAME));
CREATE TABLE CUSTOM_FIELD_VALUE_1(ID INTEGER NOT NULL,SVERSION INTEGER,NODEID INTEGER,NODEREALPATH VARCHAR(256),FIELDID INTEGER,STRINGVALUE VARCHAR(256), UNIQUE(ID));
CREATE TABLE DRESULT_3(REPORTSET VARCHAR(256),VERSIONNUMBER BIGINT NOT NULL,REPORT VARCHAR(256) NOT NULL,REPORTDISPLAYNAME VARCHAR(256),RESULT VARCHAR(256) NOT NULL,VIEWEDFORMATS BIGINT,PLSRESULTFMTS BIGINT,SECCONSTRAINTFMTS BIGINT);
CREATE TABLE DYNAMICNODE_5(NAME VARCHAR(256) NOT NULL,ROOT VARCHAR(256) NOT NULL,REALPATH VARCHAR(256) NOT NULL,NODETYPE SMALLINT NOT NULL,ENABLEARCHIVEPOLICY SMALLINT NOT NULL,DELETED SMALLINT NOT NULL,ACLID INTEGER,DESCRIPTION VARCHAR(256),MAXVERSIONAMOUNT INTEGER,ENABLELINKEDCAT SMALLINT NOT NULL,LINKEDCAT VARCHAR(256),USEINHERITED SMALLINT NOT NULL,ENABLENLS SMALLINT NOT NULL,STATUS SMALLINT,LINKEDCATID INTEGER);
CREATE TABLE DYNAMICRESULT_2(ID INTEGER NOT NULL,REPORTNAME VARCHAR(256) NOT NULL,VERSIONNUMBER INTEGER NOT NULL,CREATOR VARCHAR(256) NOT NULL,CREATEDTIME BIGINT NOT NULL,CATALOGVERNUM INTEGER NOT NULL,CATALOGRESNUM INTEGER NOT NULL,REPORTVERNUM INTEGER NOT NULL,REPORTRESNUM INTEGER NOT NULL,PARAMFILE VARCHAR(256),RESULTFILE VARCHAR(256) NOT NULL,RESULTFMTS BIGINT NOT NULL,LAUNCHTYPE INTEGER NOT NULL,TASKID VARCHAR(128),EXPIRATIONTIME BIGINT NOT NULL,EXPIRE SMALLINT NOT NULL,EXPIRATIONMETHOD INTEGER,REPORTAMOUNT INTEGER);
CREATE TABLE DYN_SECURITY_1(ID INTEGER NOT NULL,SVERSION INTEGER,CATALOG_PATH VARCHAR(255),SECURITY_FILE_NAME VARCHAR(255),SECURITY_FILE_PATH VARCHAR(255),TYPE INTEGER, UNIQUE(ID));
CREATE TABLE EXTENDACLENTRIES_3(PRINCIPAL_NAME VARCHAR(255) NOT NULL,PRINCIPAL_TYPE SMALLINT NOT NULL,PERMISSIONS INTEGER NOT NULL, UNIQUE(PRINCIPAL_NAME,PRINCIPAL_TYPE));
CREATE TABLE FOLDERS_4(ID INTEGER NOT NULL,REALPATH VARCHAR(256),OWNERNAME VARCHAR(256),MAXVERSIONAMOUNT INTEGER NOT NULL,ARCHIVENEWVERSION SMALLINT NOT NULL,ENABLEARCHIVEPOLICY SMALLINT NOT NULL,IS_SHARED SMALLINT NOT NULL,ENABLEDYNAMICRESOURCE SMALLINT NOT NULL);
CREATE TABLE GROUPPROFILES_2(GROUP_NAME VARCHAR(65),SUB_GROUP_NAME VARCHAR(65));
CREATE TABLE GROUPS_3(NAME VARCHAR(65) NOT NULL,BUILDIN SMALLINT NOT NULL,DESCRIPTION VARCHAR(256),GROUP_TYPE INTEGER NOT NULL, PRIMARY KEY(NAME));
CREATE TABLE GUPROFILES_3(GROUP_NAME VARCHAR(65),USER_NAME VARCHAR(256));
CREATE TABLE HISTORY_PARAMLIST_TABLE_1(ID INTEGER NOT NULL,REALM VARCHAR(256) NOT NULL,USER11 VARCHAR(256) NOT NULL,FILE1 BLOB NOT NULL, UNIQUE(ID));
CREATE TABLE JR_QRTZ_CALENDARS(CALENDAR_NAME VARCHAR(200) NOT NULL,CALENDAR BLOB NOT NULL, PRIMARY KEY(CALENDAR_NAME));
CREATE TABLE JR_QRTZ_FIRED_TRIGGERS(ENTRY_ID VARCHAR(95) NOT NULL,TRIGGER_NAME VARCHAR(200) NOT NULL,TRIGGER_GROUP VARCHAR(200) NOT NULL,IS_VOLATILE SMALLINT NOT NULL,INSTANCE_NAME VARCHAR(200) NOT NULL,FIRED_TIME BIGINT NOT NULL,PRIORITY INTEGER NOT NULL,STATE VARCHAR(16) NOT NULL,JOB_NAME VARCHAR(200),JOB_GROUP VARCHAR(200),IS_STATEFUL SMALLINT,REQUESTS_RECOVERY SMALLINT, PRIMARY KEY(ENTRY_ID));
CREATE TABLE JR_QRTZ_LOCKS(LOCK_NAME VARCHAR(200) NOT NULL, PRIMARY KEY(LOCK_NAME));
CREATE TABLE JR_QRTZ_PAUSED_TRIGGER_GRPS(TRIGGER_GROUP VARCHAR(200) NOT NULL, PRIMARY KEY(TRIGGER_GROUP));
CREATE TABLE JR_QRTZ_SCHEDULER_STATE(INSTANCE_NAME VARCHAR(200) NOT NULL,LAST_CHECKIN_TIME BIGINT NOT NULL,CHECKIN_INTERVAL BIGINT NOT NULL, PRIMARY KEY(INSTANCE_NAME));
CREATE TABLE LCVERSION_2(VERSIONNUMBER INTEGER NOT NULL,VERSIONNAME VARCHAR(128),RESOURCEID INTEGER NOT NULL,CREATOR VARCHAR(128),CREATEDTIME BIGINT NOT NULL,MODIFIER VARCHAR(128),MODIFIEDTIME BIGINT NOT NULL,LCFILE VARCHAR(512) NOT NULL,ID BIGINT NOT NULL,DISKSIZE BIGINT, UNIQUE(ID));
CREATE TABLE NODES_6(ID INTEGER NOT NULL,NAME VARCHAR(256) NOT NULL,CREATORNAME VARCHAR(256) NOT NULL,CREATETIME BIGINT NOT NULL,PARENTID INTEGER NOT NULL,NODETYPE SMALLINT NOT NULL,ACLID INTEGER,DESCRIPTION VARCHAR(256),ENABLELINKEDCAT SMALLINT,LINKEDCAT VARCHAR(256),USEINHERITED SMALLINT,LINKEDCATID INTEGER,ORGANIZATION VARCHAR(32));
CREATE TABLE ORGANIZATIONS_1(NAME VARCHAR(32) NOT NULL,DESCRIPTION VARCHAR(256),USERAMOUNT INTEGER, PRIMARY KEY(NAME));
CREATE TABLE REPORTVERSION_4(VERSIONNUMBER INTEGER NOT NULL,VERSIONNAME VARCHAR(256),RESOURCEID INTEGER NOT NULL,CREATOR VARCHAR(256),CREATETIME BIGINT NOT NULL,MODIFIER VARCHAR(256),MODIFIEDTIME BIGINT NOT NULL,REPORTFILE VARCHAR(512) NOT NULL,ID BIGINT NOT NULL,DISKSIZE BIGINT, UNIQUE(RESOURCEID,ID));
CREATE TABLE RESOURCEMAP_2(RESOURCEID INTEGER NOT NULL,RESOURCENAME VARCHAR(512) NOT NULL,RESOURCETYPE SMALLINT NOT NULL);
CREATE TABLE RESOURCENLS_1(LOC VARCHAR(10) NOT NULL,FOLDER_ID INTEGER NOT NULL,KEY_TEXT VARCHAR(256) NOT NULL,VALUE_TEXT VARCHAR(512) NOT NULL,ORGANIZATION VARCHAR(32), PRIMARY KEY(LOC,FOLDER_ID,KEY_TEXT));
CREATE TABLE RESOURCENODES_5(ID INTEGER NOT NULL,RESOURCETYPE SMALLINT NOT NULL,REALPATH VARCHAR(256),MAXVERSIONAMOUNT INTEGER NOT NULL,ARCHIVENEWVERSION SMALLINT NOT NULL,ENABLEARCHIVEPOLICY SMALLINT NOT NULL,PROFILENAME VARCHAR(256),ENABLENLS SMALLINT NOT NULL,STATUS SMALLINT,RESOURCESUBTYPE SMALLINT);
CREATE TABLE RESOURCE_LOCK(LOCK_NAME VARCHAR(512) NOT NULL, PRIMARY KEY(LOCK_NAME));
CREATE TABLE RESULTVERSION_3(ID BIGINT NOT NULL,VERSIONNUMBER INTEGER NOT NULL,VERSIONNAME VARCHAR(128) NOT NULL,RESOURCEID INTEGER NOT NULL,CREATOR VARCHAR(128),CREATEDTIME BIGINT NOT NULL,MODIFIER VARCHAR(128),MODIFIEDTIME BIGINT NOT NULL,CATALOGVERNUM INTEGER NOT NULL,CATALOGRESNUM INTEGER NOT NULL,REPORTVERNUM INTEGER NOT NULL,REPORTRESNUM INTEGER NOT NULL,PARAMFILE VARCHAR(128),RESULTFILE VARCHAR(128) NOT NULL,RESULTFMTS BIGINT NOT NULL,LAUNCHTYPE INTEGER NOT NULL,TASKID VARCHAR(128),EXPIRATIONTIME BIGINT NOT NULL,EXPIRE SMALLINT NOT NULL,EXPIREATIONMETHOD INTEGER,SPECIFIEDFOLDER VARCHAR(128),REPORTAMOUNT INTEGER,DISKSIZE BIGINT, UNIQUE(ID,RESOURCEID));
CREATE TABLE RESULT_3(RESOURCEID BIGINT NOT NULL,VERSIONNUMBER BIGINT NOT NULL,REPORT VARCHAR(256) NOT NULL,REPORTDISPLAYNAME VARCHAR(256),RESULT VARCHAR(256) NOT NULL,VIEWEDFORMATS BIGINT,PLSRESULTFMTS BIGINT,SECCONSTRAINTFMTS BIGINT);
CREATE TABLE RGPROFILES_2(ROLE_NAME VARCHAR(65),GROUP_NAME VARCHAR(65));
CREATE TABLE ROLEPROFILES_3(ROLE_NAME VARCHAR(65),SUB_ROLE_NAME VARCHAR(65));
CREATE TABLE ROLES_4(NAME VARCHAR(65) NOT NULL,BUILDIN SMALLINT NOT NULL,DESCRIPTION VARCHAR(256),ROLE_TYPE INTEGER NOT NULL, PRIMARY KEY(NAME));
CREATE TABLE SCHDLASTEXETIME_1(TASKID VARCHAR(40) NOT NULL,LASTEXETIME BIGINT NOT NULL);
CREATE TABLE STORAGE_MEMBER_1(FILEID INTEGER NOT NULL,UNITINDEX INTEGER NOT NULL,BITS BIGINT NOT NULL, UNIQUE(FILEID,UNITINDEX));
CREATE TABLE STORAGE_RESOURCE_1(ID INTEGER NOT NULL,PATH VARCHAR(255) NOT NULL,ISDIRECTORY SMALLINT NOT NULL,LAST_MODIFIED BIGINT, PRIMARY KEY(ID), UNIQUE(PATH));
CREATE TABLE TBL_DUAL_JINFONET(DUAL_COL SMALLINT NOT NULL);
CREATE TABLE TBL_IDGENRATOR_JINFONET(TF_NAME VARCHAR(64) NOT NULL,NEXT_ID INTEGER NOT NULL, PRIMARY KEY(TF_NAME));
CREATE TABLE TBL_LOCK_JINFONET(LOCK_NAME VARCHAR(255) NOT NULL, PRIMARY KEY(LOCK_NAME));
CREATE TABLE TRIGGERS_1(TRIGGER_NAME VARCHAR(80) NOT NULL,DESCRIPTION VARCHAR(255),TRIGGER_TYPE SMALLINT NOT NULL,TRIGGER_STATE SMALLINT NOT NULL,PREV_FIRE_TIME BIGINT,NEXT_FIRE_TIME BIGINT, PRIMARY KEY(TRIGGER_NAME));
CREATE TABLE UPDATEDETAILS_1(UPDATE_ITEM VARCHAR(32) NOT NULL,UPDATE_STATE SMALLINT NOT NULL, PRIMARY KEY(UPDATE_ITEM));
CREATE TABLE USERPROFILES_4(USER_NAME VARCHAR(256),ROLE_NAME VARCHAR(65));
CREATE TABLE USERS_4(NAME VARCHAR(255) NOT NULL,FULL_NAME VARCHAR(256),DESCRIPTION VARCHAR(256),EMAIL VARCHAR(256),CREATE_TIME BIGINT NOT NULL,USER_PSWD VARCHAR(512),BUILDIN SMALLINT NOT NULL,ENABLE SMALLINT NOT NULL,MIN_PS_LENGTH INTEGER,LAST_MODIFY_TIME BIGINT,NEVER_EXPIRE SMALLINT NOT NULL,EXPIRE_TIME INTEGER,ACCOUNT_DISABLE SMALLINT NOT NULL,ACCESS_EVENT_SUC SMALLINT NOT NULL,ACCESS_EVENT_FAIL SMALLINT NOT NULL,MANAGEMENT_EVENT_SUC SMALLINT NOT NULL,MANAGEMENT_EVENT_FAIL SMALLINT NOT NULL,NO_AUDIT SMALLINT NOT NULL,AUTH_TYPE INTEGER NOT NULL,LDAP_TYPE INTEGER, PRIMARY KEY(NAME));
CREATE TABLE VERSIONNODES_3(ID INTEGER NOT NULL,RESOURCEID INTEGER NOT NULL,VERSIONNUMBER INTEGER NOT NULL,EXPIRATIONTIME BIGINT NOT NULL,AUTHOR VARCHAR(256),AUTHOREMAIL VARCHAR(256),BUILDINDESC VARCHAR(256));
