-- =======================================================================
--   DBMS name:      Oracle                                               
--   Version:        10g or higher                                        
--   Notes:          Require max pagesize 16k at least                    
--   Created on:     2016-05-16                                           
-- =======================================================================

-- =======================================================================
--   system database                                                      
-- =======================================================================
DROP TABLE CFG_PROPS_2 cascade constraints;
DROP TABLE GLOBAL_NLS_FONT_1 cascade constraints;
DROP TABLE GLOBAL_NLS_FORMAT_1 cascade constraints;
DROP TABLE GLOBAL_NLS_TEXT_1 cascade constraints;
DROP TABLE MEMBERS cascade constraints;
DROP TABLE RESOURCE_LOCK cascade constraints;
DROP TABLE TBL_DUAL_JINFONET cascade constraints;
DROP TABLE TBL_IDGENRATOR_JINFONET cascade constraints;
DROP TABLE TBL_LOCK_JINFONET cascade constraints;
DROP TABLE UPDATEDETAILS_1 cascade constraints;
CREATE TABLE CFG_PROPS_2(PROP_NAME VARCHAR(128) NOT NULL,PROP_KEY VARCHAR(512) NOT NULL,PROP_VALUE VARCHAR(512),IS_LOB NUMBER(1) 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  NUMBER(10) NOT NULL,TAR_FACE VARCHAR(20) NOT NULL,TAR_SIZE  NUMBER(10) NOT NULL,IS_RELATIVE NUMBER(1) 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  NUMBER(10) 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  NUMBER(10) NOT NULL,RMI_HOST VARCHAR(32) NOT NULL,RMI_PORT  NUMBER(10) 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 NUMBER(1) NOT NULL);
CREATE TABLE TBL_IDGENRATOR_JINFONET(TF_NAME VARCHAR(64) NOT NULL,NEXT_ID  NUMBER(10) 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 NUMBER(1) NOT NULL, PRIMARY KEY(UPDATE_ITEM));

-- =======================================================================
--   profile database                                                     
-- =======================================================================
DROP TABLE RESOURCE_LOCK cascade constraints;
DROP TABLE TASKAUDIT cascade constraints;
DROP TABLE TASKCONTEXT_2 cascade constraints;
DROP TABLE TBL_DUAL_JINFONET cascade constraints;
DROP TABLE TBL_IDGENRATOR_JINFONET cascade constraints;
DROP TABLE TBL_LOCK_JINFONET cascade constraints;
DROP TABLE UPDATEDETAILS_1 cascade constraints;
CREATE TABLE RESOURCE_LOCK(LOCK_NAME VARCHAR(512) NOT NULL, PRIMARY KEY(LOCK_NAME));
CREATE TABLE TASKAUDIT(ID  NUMBER(10) NOT NULL,TASK_ID VARCHAR(128),REPORT_NAME VARCHAR(256),CATALOG_NAME VARCHAR(256),CATALOG_NAMES BLOB,USER_NAME VARCHAR(128),TASK_TYPE  NUMBER(10),TASK_STATUS  NUMBER(10),PAGE_NUMBER  NUMBER(10),RUN_TIMES  NUMBER(10),SUBMIT_TIME  NUMBER(19),START_TIME  NUMBER(19),COMPLETE_TIME  NUMBER(19),FAIL_REASON VARCHAR(256),PARAMETERS BLOB, PRIMARY KEY(ID));
CREATE TABLE TASKCONTEXT_2(ID  NUMBER(10) NOT NULL,VS_RPT_NAME VARCHAR(255),VI_TSK_TYPE  NUMBER(10),VI_TSK_STATUS  NUMBER(10),TS_TSK_SUBMIT DATE,TS_ENG_START DATE,TS_ENG_EXITS DATE,TS_TSK_COMPLETE DATE,TC_TSK_TOTAL  NUMBER(19),TC_TSK_WAITED  NUMBER(19),TC_ENG_TOTAL  NUMBER(19),TC_ENG_LOAD  NUMBER(19),TC_ENG_EXPORT  NUMBER(19),TC_ENG_OTHER  NUMBER(19),TC_TSK_OTHER  NUMBER(19),NC_RPT_PAGES  NUMBER(19),NC_RPT_FORMATS  NUMBER(19),NC_ENG_CONCURRENT  NUMBER(19),NC_QUE_LENGTH  NUMBER(19),TASK_TYPE VARCHAR(16), PRIMARY KEY(ID));
CREATE TABLE TBL_DUAL_JINFONET(DUAL_COL NUMBER(1) NOT NULL);
CREATE TABLE TBL_IDGENRATOR_JINFONET(TF_NAME VARCHAR(64) NOT NULL,NEXT_ID  NUMBER(10) 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 NUMBER(1) NOT NULL, PRIMARY KEY(UPDATE_ITEM));

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