-- =======================================================================
--   DBMS name:      Sybase                                               
--   Version:        12.5 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(255) NOT NULL,PROP_VALUE VARCHAR(255) NULL,IS_LOB TINYINT 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 TINYINT 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(255) 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(255) 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(255) NOT NULL, PRIMARY KEY(LOCK_NAME))
GO
CREATE TABLE TBL_DUAL_JINFONET(DUAL_COL TINYINT 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 TINYINT 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(255) NOT NULL, PRIMARY KEY(LOCK_NAME))
GO
CREATE TABLE TASKAUDIT(ID INTEGER NOT NULL,TASK_ID VARCHAR(128) NULL,REPORT_NAME VARCHAR(255) NULL,CATALOG_NAME VARCHAR(255) 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 NUMERIC(19) NULL,START_TIME NUMERIC(19) NULL,COMPLETE_TIME NUMERIC(19) NULL,FAIL_REASON VARCHAR(255) 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 NUMERIC(19) NULL,TC_TSK_WAITED NUMERIC(19) NULL,TC_ENG_TOTAL NUMERIC(19) NULL,TC_ENG_LOAD NUMERIC(19) NULL,TC_ENG_EXPORT NUMERIC(19) NULL,TC_ENG_OTHER NUMERIC(19) NULL,TC_TSK_OTHER NUMERIC(19) NULL,NC_RPT_PAGES NUMERIC(19) NULL,NC_RPT_FORMATS NUMERIC(19) NULL,NC_ENG_CONCURRENT NUMERIC(19) NULL,NC_QUE_LENGTH NUMERIC(19) NULL,TASK_TYPE VARCHAR(16) NULL, PRIMARY KEY(ID))
GO
CREATE TABLE TBL_DUAL_JINFONET(DUAL_COL TINYINT 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 TINYINT 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(255) NOT NULL,IS_POSITIVE TINYINT 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 NUMERIC(19) NULL, PRIMARY KEY(ID))
GO
CREATE TABLE ACLS_WITH_RESOURCE_1(ID INTEGER NOT NULL,RESOURCE_PATH VARCHAR(255) NOT NULL,VERSION_NUMBER INTEGER NOT NULL,ACL_NAME VARCHAR(255) NOT NULL,CREATE_NAME VARCHAR(32) NOT NULL,CREATE_TIME NUMERIC(19) NULL, PRIMARY KEY(ID))
GO
CREATE TABLE ALIASES_2(ID INTEGER NOT NULL,PRINCIPAL_NAME VARCHAR(255) NOT NULL,PRINCIPAL_TYPE TINYINT NOT NULL,ALIAS_NAME VARCHAR(255) NOT NULL,PARENT_NAME VARCHAR(255) NULL,MAP_RESOURCE VARCHAR(255) NOT NULL,HIDDEN TINYINT 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(255) NOT NULL,FIELD_DATASOURCE VARCHAR(255) NOT NULL,FIELD_QUERY VARCHAR(255) 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(255) 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 NUMERIC(19) NOT NULL,MODIFIER VARCHAR(128) NULL,MODIFIEDTIME NUMERIC(19) NOT NULL,CATALOGFILE VARCHAR(255) NOT NULL,ID NUMERIC(19) NOT NULL,DISKSIZE NUMERIC(19) NULL, UNIQUE(ID))
GO
CREATE TABLE CFG_PROPS_2(PROP_NAME VARCHAR(128) NOT NULL,PROP_KEY VARCHAR(255) NOT NULL,PROP_VALUE VARCHAR(255) NULL,IS_LOB TINYINT 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(255) NOT NULL,DISPLAYNAME VARCHAR(255) 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(255) NOT NULL)
GO
CREATE TABLE COMPLETEDTABLE_4(ID INTEGER NOT NULL,RECORDID VARCHAR(128) NULL,TASKID VARCHAR(128) NOT NULL,TASKCLASS VARCHAR(255) NOT NULL,CATFILE VARCHAR(255) NULL,RPTFILE VARCHAR(255) NULL,PARAMFILE VARCHAR(255) NULL,RESULTFILE VARCHAR(255) NULL,ERROR VARCHAR(255) NULL,ENGMSG VARCHAR(255) NULL,SUBMITTER VARCHAR(128) NULL,COMPLETEDTIME NUMERIC(19) NULL,FORMATEXISTS INTEGER NULL,FORMATSUCCESSFUL INTEGER NULL,VERSIONID INTEGER NULL,LAUNCHTYPE INTEGER NULL,ISSUCCESSFUL TINYINT NOT NULL,TASKNAME VARCHAR(128) NULL,ISMISSED TINYINT NOT NULL,SCHEDULETRIGGER VARCHAR(80) NULL,CONDITIONSLOGIC VARCHAR(16) NULL,REPORTNAMES VARCHAR(255) 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 NUMERIC(19) NULL,USERNAME VARCHAR(255) NULL,PWD VARCHAR(255) NULL,PARAMFILE VARCHAR(255) NULL,LAZY INTEGER NULL,CATALOGVERSION INTEGER NULL,CATALOGLASTMODIFIED NUMERIC(19) NULL,STARTTIME NUMERIC(19) NULL,COMPLETEDTIME NUMERIC(19) NULL,SUCC INTEGER NULL,BVNAME VARCHAR(255) NULL,ACTIVITYTYPE TINYINT NULL,MESSAGE VARCHAR(255) NULL, UNIQUE(ID))
GO
CREATE TABLE COMP_CRD_CONN_INFO_1(ID INTEGER NULL,CONNNAME VARCHAR(255) NULL,USERNAME VARCHAR(255) NULL,PWD VARCHAR(255) 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 NUMERIC(19) NULL,USERNAME VARCHAR(255) NULL,PWD VARCHAR(255) NULL,PARAMFILE VARCHAR(255) NULL,LAZY INTEGER NULL,RESULTVERSION INTEGER NULL,CATALOGVERSION INTEGER NULL,CATALOGLASTMODIFIED NUMERIC(19) NULL,TASKID VARCHAR(255) NULL,CONFIGFILE VARCHAR(255) NULL,LOGINUSER VARCHAR(255) NULL,CACHETYPE INTEGER NULL,BVNAME VARCHAR(255) NULL,STATUS TINYINT NULL,CREATETIME NUMERIC(19) NULL,MAXMEMORY REAL NULL,FLAGS INTEGER NULL,LOCATION TINYINT NULL, UNIQUE(ID))
GO
CREATE TABLE CRDRUNDETAIL_1(ID INTEGER NULL,ACTIVITY TINYINT NULL,STARTTIME NUMERIC(19) NULL,ENDTIME NUMERIC(19) NULL,SUCC TINYINT NULL, FOREIGN KEY (ID) REFERENCES CRD_INFO_5(ID))
GO
CREATE TABLE CRD_CONN_INFO_1(ID INTEGER NULL,CONNNAME VARCHAR(255) NULL,USERNAME VARCHAR(255) NULL,PWD VARCHAR(255) NULL, FOREIGN KEY (ID) REFERENCES CRD_INFO_5(ID))
GO
CREATE TABLE DASHBOARDLISTENER_1(CLASSNAME VARCHAR(255) NOT NULL,DESCRIPTION VARCHAR(255) NULL,ENABLED TINYINT NOT NULL,CREATETIME NUMERIC(19) NULL, PRIMARY KEY(CLASSNAME))
GO
CREATE TABLE DASHBOARDLISTENERTARGET_1(CLASSNAME VARCHAR(255) NULL,TARGET VARCHAR(255) NULL,APPLYTIME NUMERIC(19) NULL, FOREIGN KEY (CLASSNAME) REFERENCES DASHBOARDLISTENER_1(CLASSNAME))
GO
CREATE TABLE DYNAMIC_CONNECTIONS_2(CONN_ID INTEGER NOT NULL,ORG_NAME VARCHAR(255) NULL,CATALOG VARCHAR(255) NOT NULL,DATASOURCRE VARCHAR(255) NOT NULL,CONNECTION_NAME VARCHAR(255) NULL,CONN_PROPERTIES IMAGE NULL, PRIMARY KEY(CONN_ID))
GO
CREATE TABLE DYNAMIC_CONNECTIONS_MAPPING_2(CONN_ID INTEGER NOT NULL,PRINCIPAL VARCHAR(255) NOT NULL,PRINCIPAL_TYPE VARCHAR(64) NOT NULL,DB_USER VARCHAR(255) NULL,DB_PASSWORD VARCHAR(255) 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(255) NULL,CATALOG VARCHAR(255) NOT NULL,PRINCIPAL_NAME VARCHAR(255) 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(255) 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 TINYINT NOT NULL,IS_VOLATILE TINYINT NOT NULL,IS_STATEFUL TINYINT NOT NULL,REQUESTS_RECOVERY TINYINT 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 TINYINT NOT NULL,DESCRIPTION VARCHAR(250) NULL,NEXT_FIRE_TIME NUMERIC(19) NOT NULL,PREV_FIRE_TIME NUMERIC(19) NOT NULL,PRIORITY INTEGER NOT NULL,TRIGGER_STATE VARCHAR(16) NOT NULL,TRIGGER_TYPE VARCHAR(8) NOT NULL,START_TIME NUMERIC(19) NOT NULL,END_TIME NUMERIC(19) 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 NUMERIC(19) NOT NULL,REPEAT_INTERVAL NUMERIC(19) NOT NULL,TIMES_TRIGGERED NUMERIC(19) 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(255) NULL, UNIQUE(ID,NAME))
GO
CREATE TABLE CUSTOM_FIELD_VALUE_1(ID INTEGER NOT NULL,SVERSION INTEGER NULL,NODEID INTEGER NULL,NODEREALPATH VARCHAR(255) NULL,FIELDID INTEGER NULL,STRINGVALUE VARCHAR(255) NULL, UNIQUE(ID))
GO
CREATE TABLE DRESULT_3(REPORTSET VARCHAR(255) NULL,VERSIONNUMBER NUMERIC(19) NOT NULL,REPORT VARCHAR(255) NOT NULL,REPORTDISPLAYNAME VARCHAR(255) NULL,RESULT VARCHAR(255) NOT NULL,VIEWEDFORMATS NUMERIC(19) NULL,PLSRESULTFMTS NUMERIC(19) NULL,SECCONSTRAINTFMTS NUMERIC(19) NULL)
GO
CREATE TABLE DYNAMICNODE_5(NAME VARCHAR(255) NOT NULL,ROOT VARCHAR(255) NOT NULL,REALPATH VARCHAR(255) NOT NULL,NODETYPE TINYINT NOT NULL,ENABLEARCHIVEPOLICY TINYINT NOT NULL,DELETED TINYINT NOT NULL,ACLID INTEGER NULL,DESCRIPTION VARCHAR(255) NULL,MAXVERSIONAMOUNT INTEGER NULL,ENABLELINKEDCAT TINYINT NOT NULL,LINKEDCAT VARCHAR(255) NULL,USEINHERITED TINYINT NOT NULL,ENABLENLS TINYINT NOT NULL,STATUS TINYINT NULL,LINKEDCATID INTEGER NULL)
GO
CREATE TABLE DYNAMICRESULT_2(ID INTEGER NOT NULL,REPORTNAME VARCHAR(255) NOT NULL,VERSIONNUMBER INTEGER NOT NULL,CREATOR VARCHAR(255) NOT NULL,CREATEDTIME NUMERIC(19) NOT NULL,CATALOGVERNUM INTEGER NOT NULL,CATALOGRESNUM INTEGER NOT NULL,REPORTVERNUM INTEGER NOT NULL,REPORTRESNUM INTEGER NOT NULL,PARAMFILE VARCHAR(255) NULL,RESULTFILE VARCHAR(255) NOT NULL,RESULTFMTS NUMERIC(19) NOT NULL,LAUNCHTYPE INTEGER NOT NULL,TASKID VARCHAR(128) NULL,EXPIRATIONTIME NUMERIC(19) NOT NULL,EXPIRE TINYINT 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(255) NULL,OWNERNAME VARCHAR(255) NULL,MAXVERSIONAMOUNT INTEGER NOT NULL,ARCHIVENEWVERSION TINYINT NOT NULL,ENABLEARCHIVEPOLICY TINYINT NOT NULL,IS_SHARED TINYINT NOT NULL,ENABLEDYNAMICRESOURCE TINYINT 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 TINYINT NOT NULL,DESCRIPTION VARCHAR(255) NULL,GROUP_TYPE INTEGER NOT NULL, PRIMARY KEY(NAME))
GO
CREATE TABLE GUPROFILES_3(GROUP_NAME VARCHAR(65) NULL,USER_NAME VARCHAR(255) NULL)
GO
CREATE TABLE HISTORY_PARAMLIST_TABLE_1(ID INTEGER NOT NULL,REALM VARCHAR(255) NOT NULL,USER11 VARCHAR(255) 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 TINYINT NOT NULL,INSTANCE_NAME VARCHAR(200) NOT NULL,FIRED_TIME NUMERIC(19) NOT NULL,PRIORITY INTEGER NOT NULL,STATE VARCHAR(16) NOT NULL,JOB_NAME VARCHAR(200) NULL,JOB_GROUP VARCHAR(200) NULL,IS_STATEFUL TINYINT NULL,REQUESTS_RECOVERY TINYINT 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 NUMERIC(19) NOT NULL,CHECKIN_INTERVAL NUMERIC(19) 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 NUMERIC(19) NOT NULL,MODIFIER VARCHAR(128) NULL,MODIFIEDTIME NUMERIC(19) NOT NULL,LCFILE VARCHAR(255) NOT NULL,ID NUMERIC(19) NOT NULL,DISKSIZE NUMERIC(19) NULL, UNIQUE(ID))
GO
CREATE TABLE NODES_6(ID INTEGER NOT NULL,NAME VARCHAR(255) NOT NULL,CREATORNAME VARCHAR(255) NOT NULL,CREATETIME NUMERIC(19) NOT NULL,PARENTID INTEGER NOT NULL,NODETYPE TINYINT NOT NULL,ACLID INTEGER NULL,DESCRIPTION VARCHAR(255) NULL,ENABLELINKEDCAT TINYINT NULL,LINKEDCAT VARCHAR(255) NULL,USEINHERITED TINYINT NULL,LINKEDCATID INTEGER NULL,ORGANIZATION VARCHAR(32) NULL)
GO
CREATE TABLE ORGANIZATIONS_1(NAME VARCHAR(32) NOT NULL,DESCRIPTION VARCHAR(255) NULL,USERAMOUNT INTEGER NULL, PRIMARY KEY(NAME))
GO
CREATE TABLE REPORTVERSION_4(VERSIONNUMBER INTEGER NOT NULL,VERSIONNAME VARCHAR(255) NULL,RESOURCEID INTEGER NOT NULL,CREATOR VARCHAR(255) NULL,CREATETIME NUMERIC(19) NOT NULL,MODIFIER VARCHAR(255) NULL,MODIFIEDTIME NUMERIC(19) NOT NULL,REPORTFILE VARCHAR(255) NOT NULL,ID NUMERIC(19) NOT NULL,DISKSIZE NUMERIC(19) NULL, UNIQUE(RESOURCEID,ID))
GO
CREATE TABLE RESOURCEMAP_2(RESOURCEID INTEGER NOT NULL,RESOURCENAME VARCHAR(255) NOT NULL,RESOURCETYPE TINYINT NOT NULL)
GO
CREATE TABLE RESOURCENLS_1(LOC VARCHAR(10) NOT NULL,FOLDER_ID INTEGER NOT NULL,KEY_TEXT VARCHAR(255) NOT NULL,VALUE_TEXT VARCHAR(255) 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(255) NULL,MAXVERSIONAMOUNT INTEGER NOT NULL,ARCHIVENEWVERSION TINYINT NOT NULL,ENABLEARCHIVEPOLICY TINYINT NOT NULL,PROFILENAME VARCHAR(255) NULL,ENABLENLS TINYINT NOT NULL,STATUS TINYINT NULL,RESOURCESUBTYPE TINYINT NULL)
GO
CREATE TABLE RESOURCE_LOCK(LOCK_NAME VARCHAR(255) NOT NULL, PRIMARY KEY(LOCK_NAME))
GO
CREATE TABLE RESULTVERSION_3(ID NUMERIC(19) NOT NULL,VERSIONNUMBER INTEGER NOT NULL,VERSIONNAME VARCHAR(128) NOT NULL,RESOURCEID INTEGER NOT NULL,CREATOR VARCHAR(128) NULL,CREATEDTIME NUMERIC(19) NOT NULL,MODIFIER VARCHAR(128) NULL,MODIFIEDTIME NUMERIC(19) 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 NUMERIC(19) NOT NULL,LAUNCHTYPE INTEGER NOT NULL,TASKID VARCHAR(128) NULL,EXPIRATIONTIME NUMERIC(19) NOT NULL,EXPIRE TINYINT NOT NULL,EXPIREATIONMETHOD INTEGER NULL,SPECIFIEDFOLDER VARCHAR(128) NULL,REPORTAMOUNT INTEGER NULL,DISKSIZE NUMERIC(19) NULL, UNIQUE(ID,RESOURCEID))
GO
CREATE TABLE RESULT_3(RESOURCEID NUMERIC(19) NOT NULL,VERSIONNUMBER NUMERIC(19) NOT NULL,REPORT VARCHAR(255) NOT NULL,REPORTDISPLAYNAME VARCHAR(255) NULL,RESULT VARCHAR(255) NOT NULL,VIEWEDFORMATS NUMERIC(19) NULL,PLSRESULTFMTS NUMERIC(19) NULL,SECCONSTRAINTFMTS NUMERIC(19) 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 TINYINT NOT NULL,DESCRIPTION VARCHAR(255) NULL,ROLE_TYPE INTEGER NOT NULL, PRIMARY KEY(NAME))
GO
CREATE TABLE SCHDLASTEXETIME_1(TASKID VARCHAR(40) NOT NULL,LASTEXETIME NUMERIC(19) NOT NULL)
GO
CREATE TABLE STORAGE_MEMBER_1(FILEID INTEGER NOT NULL,UNITINDEX INTEGER NOT NULL,BITS NUMERIC(19) NOT NULL, UNIQUE(FILEID,UNITINDEX))
GO
CREATE TABLE STORAGE_RESOURCE_1(ID INTEGER NOT NULL,PATH VARCHAR(255) NOT NULL,ISDIRECTORY TINYINT NOT NULL,LAST_MODIFIED NUMERIC(19) NULL, PRIMARY KEY(ID), UNIQUE(PATH))
GO
CREATE TABLE TBL_DUAL_JINFONET(DUAL_COL TINYINT 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 TINYINT NOT NULL,PREV_FIRE_TIME NUMERIC(19) NULL,NEXT_FIRE_TIME NUMERIC(19) NULL, PRIMARY KEY(TRIGGER_NAME))
GO
CREATE TABLE UPDATEDETAILS_1(UPDATE_ITEM VARCHAR(32) NOT NULL,UPDATE_STATE TINYINT NOT NULL, PRIMARY KEY(UPDATE_ITEM))
GO
CREATE TABLE USERPROFILES_4(USER_NAME VARCHAR(255) NULL,ROLE_NAME VARCHAR(65) NULL)
GO
CREATE TABLE USERS_4(NAME VARCHAR(255) NOT NULL,FULL_NAME VARCHAR(255) NULL,DESCRIPTION VARCHAR(255) NULL,EMAIL VARCHAR(255) NULL,CREATE_TIME NUMERIC(19) NOT NULL,USER_PSWD VARCHAR(255) NULL,BUILDIN TINYINT NOT NULL,ENABLE TINYINT NOT NULL,MIN_PS_LENGTH INTEGER NULL,LAST_MODIFY_TIME NUMERIC(19) NULL,NEVER_EXPIRE TINYINT NOT NULL,EXPIRE_TIME INTEGER NULL,ACCOUNT_DISABLE TINYINT NOT NULL,ACCESS_EVENT_SUC TINYINT NOT NULL,ACCESS_EVENT_FAIL TINYINT NOT NULL,MANAGEMENT_EVENT_SUC TINYINT NOT NULL,MANAGEMENT_EVENT_FAIL TINYINT NOT NULL,NO_AUDIT TINYINT 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 NUMERIC(19) NOT NULL,AUTHOR VARCHAR(255) NULL,AUTHOREMAIL VARCHAR(255) NULL,BUILDINDESC VARCHAR(255) NULL)
GO
