-- =======================================================================
--   DBMS name:      Microsoft SQL Server                                 
--   Version:        2000 or higher                                       
--   Notes:          Require max pagesize 16k at least                    
--   Created on:     2016-05-16                                           
-- =======================================================================

-- =======================================================================
--   system database                                                      
-- =======================================================================
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'CFG_PROPS_2') AND type='U') DROP TABLE CFG_PROPS_2
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'GLOBAL_NLS_FONT_1') AND type='U') DROP TABLE GLOBAL_NLS_FONT_1
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'GLOBAL_NLS_FORMAT_1') AND type='U') DROP TABLE GLOBAL_NLS_FORMAT_1
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'GLOBAL_NLS_TEXT_1') AND type='U') DROP TABLE GLOBAL_NLS_TEXT_1
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'MEMBERS') AND type='U') DROP TABLE MEMBERS
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'RESOURCE_LOCK') AND type='U') DROP TABLE RESOURCE_LOCK
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'TBL_DUAL_JINFONET') AND type='U') DROP TABLE TBL_DUAL_JINFONET
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'TBL_IDGENRATOR_JINFONET') AND type='U') DROP TABLE TBL_IDGENRATOR_JINFONET
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'TBL_LOCK_JINFONET') AND type='U') DROP TABLE TBL_LOCK_JINFONET
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'UPDATEDETAILS_1') AND type='U') DROP TABLE UPDATEDETAILS_1
GO
CREATE TABLE CFG_PROPS_2(PROP_NAME VARCHAR(128) NOT NULL,PROP_KEY VARCHAR(512) NOT NULL,PROP_VALUE VARCHAR(512) NULL,IS_LOB BIT NOT NULL,LOB_VAL IMAGE NULL, PRIMARY KEY(PROP_NAME,PROP_KEY))
GO
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 BIT NOT NULL, PRIMARY KEY(LOC,ORG_FACE,ORG_SIZE))
GO
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))
GO
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))
GO
CREATE TABLE MEMBERS(MEMBER_ID INTEGER NOT NULL,RMI_HOST VARCHAR(32) NOT NULL,RMI_PORT INTEGER NOT NULL, PRIMARY KEY(MEMBER_ID))
GO
CREATE TABLE RESOURCE_LOCK(LOCK_NAME VARCHAR(512) NOT NULL, PRIMARY KEY(LOCK_NAME))
GO
CREATE TABLE TBL_DUAL_JINFONET(DUAL_COL BIT NOT NULL)
GO
CREATE TABLE TBL_IDGENRATOR_JINFONET(TF_NAME VARCHAR(64) NOT NULL,NEXT_ID INTEGER NOT NULL, PRIMARY KEY(TF_NAME))
GO
CREATE TABLE TBL_LOCK_JINFONET(LOCK_NAME VARCHAR(255) NOT NULL, PRIMARY KEY(LOCK_NAME))
GO
CREATE TABLE UPDATEDETAILS_1(UPDATE_ITEM VARCHAR(32) NOT NULL,UPDATE_STATE BIT NOT NULL, PRIMARY KEY(UPDATE_ITEM))
GO

-- =======================================================================
--   profile database                                                     
-- =======================================================================
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'RESOURCE_LOCK') AND type='U') DROP TABLE RESOURCE_LOCK
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'TASKAUDIT') AND type='U') DROP TABLE TASKAUDIT
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'TASKCONTEXT_2') AND type='U') DROP TABLE TASKCONTEXT_2
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'TBL_DUAL_JINFONET') AND type='U') DROP TABLE TBL_DUAL_JINFONET
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'TBL_IDGENRATOR_JINFONET') AND type='U') DROP TABLE TBL_IDGENRATOR_JINFONET
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'TBL_LOCK_JINFONET') AND type='U') DROP TABLE TBL_LOCK_JINFONET
GO
IF EXISTS (SELECT 1 FROM sysobjects WHERE id=OBJECT_ID(N'UPDATEDETAILS_1') AND type='U') DROP TABLE UPDATEDETAILS_1
GO
CREATE TABLE RESOURCE_LOCK(LOCK_NAME VARCHAR(512) NOT NULL, PRIMARY KEY(LOCK_NAME))
GO
CREATE TABLE TASKAUDIT(ID INTEGER NOT NULL,TASK_ID VARCHAR(128) NULL,REPORT_NAME VARCHAR(256) NULL,CATALOG_NAME VARCHAR(256) NULL,CATALOG_NAMES IMAGE NULL,USER_NAME VARCHAR(128) NULL,TASK_TYPE INTEGER NULL,TASK_STATUS INTEGER NULL,PAGE_NUMBER INTEGER NULL,RUN_TIMES INTEGER NULL,SUBMIT_TIME BIGINT NULL,START_TIME BIGINT NULL,COMPLETE_TIME BIGINT NULL,FAIL_REASON VARCHAR(256) NULL,PARAMETERS IMAGE NULL, PRIMARY KEY(ID))
GO
CREATE TABLE TASKCONTEXT_2(ID INTEGER NOT NULL,VS_RPT_NAME VARCHAR(255) NULL,VI_TSK_TYPE INTEGER NULL,VI_TSK_STATUS INTEGER NULL,TS_TSK_SUBMIT DATETIME NULL,TS_ENG_START DATETIME NULL,TS_ENG_EXITS DATETIME NULL,TS_TSK_COMPLETE DATETIME NULL,TC_TSK_TOTAL BIGINT NULL,TC_TSK_WAITED BIGINT NULL,TC_ENG_TOTAL BIGINT NULL,TC_ENG_LOAD BIGINT NULL,TC_ENG_EXPORT BIGINT NULL,TC_ENG_OTHER BIGINT NULL,TC_TSK_OTHER BIGINT NULL,NC_RPT_PAGES BIGINT NULL,NC_RPT_FORMATS BIGINT NULL,NC_ENG_CONCURRENT BIGINT NULL,NC_QUE_LENGTH BIGINT NULL,TASK_TYPE VARCHAR(16) NULL, PRIMARY KEY(ID))
GO
CREATE TABLE TBL_DUAL_JINFONET(DUAL_COL BIT NOT NULL)
GO
CREATE TABLE TBL_IDGENRATOR_JINFONET(TF_NAME VARCHAR(64) NOT NULL,NEXT_ID INTEGER NOT NULL, PRIMARY KEY(TF_NAME))
GO
CREATE TABLE TBL_LOCK_JINFONET(LOCK_NAME VARCHAR(255) NOT NULL, PRIMARY KEY(LOCK_NAME))
GO
CREATE TABLE UPDATEDETAILS_1(UPDATE_ITEM VARCHAR(32) NOT NULL,UPDATE_STATE BIT NOT NULL, PRIMARY KEY(UPDATE_ITEM))
GO

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