crusade-tracker/system/buildserver.script
2021-01-18 15:27:50 -05:00

347 lines
44 KiB
Plaintext

SET DATABASE UNIQUE NAME HSQLDB744C4EAE96
SET DATABASE GC 0
SET DATABASE DEFAULT RESULT MEMORY ROWS 0
SET DATABASE EVENT LOG LEVEL 0
SET DATABASE TRANSACTION CONTROL MVLOCKS
SET DATABASE DEFAULT ISOLATION LEVEL READ COMMITTED
SET DATABASE TRANSACTION ROLLBACK ON CONFLICT TRUE
SET DATABASE TEXT TABLE DEFAULTS ''
SET DATABASE DEFAULT TABLE TYPE CACHED
SET DATABASE SQL NAMES FALSE
SET DATABASE SQL REGULAR NAMES FALSE
SET DATABASE SQL REFERENCES FALSE
SET DATABASE SQL SIZE TRUE
SET DATABASE SQL TYPES FALSE
SET DATABASE SQL TDC DELETE TRUE
SET DATABASE SQL TDC UPDATE TRUE
SET DATABASE SQL TRANSLATE TTI TYPES TRUE
SET DATABASE SQL CONCAT NULLS TRUE
SET DATABASE SQL UNIQUE NULLS TRUE
SET DATABASE SQL CONVERT TRUNCATE TRUE
SET DATABASE SQL AVG SCALE 0
SET DATABASE SQL DOUBLE NAN TRUE
SET DATABASE SQL SYNTAX ORA TRUE
SET FILES WRITE DELAY 500 MILLIS
SET FILES BACKUP INCREMENT TRUE
SET FILES CACHE SIZE 10000
SET FILES CACHE ROWS 50000
SET FILES SCALE 32
SET FILES LOB SCALE 32
SET FILES DEFRAG 0
SET FILES NIO TRUE
SET FILES NIO SIZE 256
SET FILES LOG TRUE
SET FILES LOG SIZE 50
CREATE USER SA PASSWORD DIGEST 'd41d8cd98f00b204e9800998ecf8427e'
ALTER USER SA SET LOCAL TRUE
CREATE SCHEMA PUBLIC AUTHORIZATION DBA
SET SCHEMA PUBLIC
CREATE CACHED TABLE PUBLIC.DB_VERSION(VERSION_NUMBER INTEGER NOT NULL,VERSION_TIME TIMESTAMP NOT NULL,CONSTRAINT DB_VERSION_PK PRIMARY KEY(VERSION_NUMBER))
CREATE CACHED TABLE PUBLIC.META_FILE_LINE(FILE_NAME VARCHAR(15) NOT NULL,LINE_NR INTEGER NOT NULL,LINE_TEXT VARCHAR(160),CONSTRAINT META_FILE_LINE_PK PRIMARY KEY(FILE_NAME,LINE_NR))
CREATE CACHED TABLE PUBLIC.SINGLE_ROW(DUMMY_FIELD CHARACTER(1))
CREATE CACHED TABLE PUBLIC.SERVER_PROPERTY(PROP_NAME VARCHAR(80) NOT NULL,PROP_VALUE VARCHAR(256) NOT NULL,CONSTRAINT SERVER_PROPERTY_PK PRIMARY KEY(PROP_NAME))
CREATE CACHED TABLE PUBLIC.DB_HEARTBEAT(NODE_ID VARCHAR(80),STARTING_CODE BIGINT NOT NULL,STARTING_TIME TIMESTAMP NOT NULL,LOCK_MODE CHARACTER(1) NOT NULL,IP_ADDRESS VARCHAR(80),ADDITIONAL_INFO VARCHAR(2000),LAST_TIME TIMESTAMP NOT NULL,UPDATE_INTERVAL BIGINT,UUID VARCHAR(80),APP_TYPE VARCHAR(80),URL VARCHAR(128),ACCESS_TOKEN VARCHAR(80),BUILD_NUMBER VARCHAR(80),DISPLAY_VERSION VARCHAR(80),RESPONSIBILITIES BIGINT,CONSTRAINT DB_HEARTBEAT_PK PRIMARY KEY(STARTING_CODE))
CREATE CACHED TABLE PUBLIC.BACKUP_INFO(MPROC_ID INTEGER NOT NULL,FILE_NAME VARCHAR(1000),FILE_SIZE BIGINT,STARTED TIMESTAMP NOT NULL,FINISHED TIMESTAMP,STATUS CHARACTER(1),CONSTRAINT BACKUP_INFO_PK PRIMARY KEY(MPROC_ID))
CREATE INDEX BACKUP_INFO_FILE_I ON PUBLIC.BACKUP_INFO(FILE_NAME)
CREATE CACHED TABLE PUBLIC.BACKUP_BUILDS(BUILD_ID BIGINT NOT NULL,CONSTRAINT BACKUP_BUILDS_PK PRIMARY KEY(BUILD_ID))
CREATE CACHED TABLE PUBLIC.CLEANUP_HISTORY(PROC_ID BIGINT NOT NULL,START_TIME BIGINT NOT NULL,FINISH_TIME BIGINT,INTERRUPT_REASON VARCHAR(20),CONSTRAINT CLEANUP_HISTORY_PK PRIMARY KEY(PROC_ID))
CREATE CACHED TABLE PUBLIC.DOMAIN_SEQUENCE(DOMAIN_NAME VARCHAR(100) NOT NULL,LAST_USED_VALUE BIGINT NOT NULL,CONSTRAINT DOMAIN_NAME_PK PRIMARY KEY(DOMAIN_NAME))
CREATE CACHED TABLE PUBLIC.PROJECT(INT_ID VARCHAR(80) NOT NULL,CONFIG_ID VARCHAR(80) NOT NULL,ORIGIN_PROJECT_ID VARCHAR(80),DELETE_TIME BIGINT,CONSTRAINT PROJECT_PK PRIMARY KEY(INT_ID),CONSTRAINT PROJECT_AK UNIQUE(CONFIG_ID))
CREATE CACHED TABLE PUBLIC.BUILD_TYPE(INT_ID VARCHAR(80) NOT NULL,CONFIG_ID VARCHAR(80) NOT NULL,ORIGIN_PROJECT_ID VARCHAR(80),DELETE_TIME BIGINT,CONSTRAINT BUILD_TYPE_PK PRIMARY KEY(INT_ID),CONSTRAINT BUILD_TYPE_AK UNIQUE(CONFIG_ID))
CREATE CACHED TABLE PUBLIC.VCS_ROOT(INT_ID INTEGER NOT NULL,CONFIG_ID VARCHAR(80) NOT NULL,ORIGIN_PROJECT_ID VARCHAR(80),DELETE_TIME BIGINT,CONSTRAINT VCS_ROOT_PK PRIMARY KEY(INT_ID),CONSTRAINT VCS_ROOT_AK UNIQUE(CONFIG_ID))
CREATE CACHED TABLE PUBLIC.PROJECT_MAPPING(INT_ID VARCHAR(80) NOT NULL,EXT_ID VARCHAR(240) NOT NULL,MAIN BIT(1) NOT NULL,CONSTRAINT PROJECT_MAPPING_PK PRIMARY KEY(INT_ID,EXT_ID),CONSTRAINT PROJECT_MAPPING_AK UNIQUE(EXT_ID))
CREATE CACHED TABLE PUBLIC.BUILD_TYPE_MAPPING(INT_ID VARCHAR(80) NOT NULL,EXT_ID VARCHAR(240) NOT NULL,MAIN BIT(1) NOT NULL,CONSTRAINT BUILD_TYPE_MAPPING_PK PRIMARY KEY(INT_ID,EXT_ID),CONSTRAINT BUILD_TYPE_MAPPING_AK UNIQUE(EXT_ID))
CREATE CACHED TABLE PUBLIC.VCS_ROOT_MAPPING(INT_ID INTEGER NOT NULL,EXT_ID VARCHAR(240) NOT NULL,MAIN BIT(1) NOT NULL,CONSTRAINT VCS_ROOT_MAPPING_PK PRIMARY KEY(INT_ID,EXT_ID),CONSTRAINT VCS_ROOT_MAPPING_AK UNIQUE(EXT_ID))
CREATE CACHED TABLE PUBLIC.AGENT_POOL(AGENT_POOL_ID INTEGER NOT NULL,AGENT_POOL_NAME VARCHAR(191),MIN_AGENTS INTEGER,MAX_AGENTS INTEGER,OWNER_PROJECT_ID VARCHAR(80),CONSTRAINT AGENT_POOL_ID_PK PRIMARY KEY(AGENT_POOL_ID))
CREATE CACHED TABLE PUBLIC.AGENT_TYPE(AGENT_TYPE_ID INTEGER NOT NULL,AGENT_POOL_ID INTEGER NOT NULL,CLOUD_CODE VARCHAR(6) NOT NULL,PROFILE_ID VARCHAR(30) NOT NULL,IMAGE_ID VARCHAR(60) NOT NULL,POLICY INTEGER NOT NULL,CONSTRAINT AGENT_TYPE_PK PRIMARY KEY(AGENT_TYPE_ID),CONSTRAINT AGENT_TYPE_AK UNIQUE(CLOUD_CODE,PROFILE_ID,IMAGE_ID))
CREATE INDEX AGENT_TYPE_POOL_I ON PUBLIC.AGENT_TYPE(AGENT_POOL_ID)
CREATE CACHED TABLE PUBLIC.AGENT_TYPE_INFO(AGENT_TYPE_ID INTEGER NOT NULL,OS_NAME VARCHAR(60) NOT NULL,CPU_RANK INTEGER,CREATED_TIMESTAMP TIMESTAMP,MODIFIED_TIMESTAMP TIMESTAMP,CONSTRAINT AGENT_TYPE_INFO_PK PRIMARY KEY(AGENT_TYPE_ID))
CREATE CACHED TABLE PUBLIC.AGENT_TYPE_RUNNER(AGENT_TYPE_ID INTEGER NOT NULL,RUNNER VARCHAR(250) NOT NULL,CONSTRAINT AGENT_TYPE_RUNNER_PK PRIMARY KEY(AGENT_TYPE_ID,RUNNER))
CREATE CACHED TABLE PUBLIC.AGENT_TYPE_VCS(AGENT_TYPE_ID INTEGER NOT NULL,VCS VARCHAR(250) NOT NULL,CONSTRAINT AGENT_TYPE_VCS_PK PRIMARY KEY(AGENT_TYPE_ID,VCS))
CREATE CACHED TABLE PUBLIC.AGENT_TYPE_PARAM(AGENT_TYPE_ID INTEGER NOT NULL,PARAM_KIND CHARACTER(1) NOT NULL,PARAM_NAME VARCHAR(160) NOT NULL,PARAM_VALUE VARCHAR(2000),CONSTRAINT AGENT_TYPE_PARAM_PK PRIMARY KEY(AGENT_TYPE_ID,PARAM_KIND,PARAM_NAME))
CREATE CACHED TABLE PUBLIC.AGENT(ID INTEGER NOT NULL,NAME VARCHAR(80) NOT NULL,HOST_ADDR VARCHAR(80) NOT NULL,PORT INTEGER NOT NULL,AGENT_TYPE_ID INTEGER NOT NULL,STATUS INTEGER,AUTHORIZED INTEGER,REGISTERED INTEGER,REGISTRATION_TIMESTAMP BIGINT,LAST_BINDING_TIMESTAMP BIGINT,UNREGISTERED_REASON VARCHAR(256),AUTHORIZATION_TOKEN VARCHAR(32),STATUS_TO_RESTORE INTEGER,STATUS_RESTORING_TIMESTAMP BIGINT,CONSTRAINT AGENT_PK PRIMARY KEY(ID),CONSTRAINT AGENT_NAME_UI UNIQUE(NAME))
CREATE INDEX AGENT_HOST_ADDRESS ON PUBLIC.AGENT(HOST_ADDR)
CREATE INDEX AGENT_AUTHORIZATION_TOKEN ON PUBLIC.AGENT(AUTHORIZATION_TOKEN)
CREATE INDEX AGENT_AGENT_TYPE_ID ON PUBLIC.AGENT(AGENT_TYPE_ID)
CREATE CACHED TABLE PUBLIC.CLOUD_ERRORS(PROJECT_ID VARCHAR(80) NOT NULL,PROFILE_ID VARCHAR(30) NOT NULL,IMAGE_ID VARCHAR(80) NOT NULL,INSTANCE_ID VARCHAR(80) NOT NULL,ERROR_MESSAGE VARCHAR(2000),CONSTRAINT CLOUD_PROFILE_STATE_PK PRIMARY KEY(PROJECT_ID,PROFILE_ID,IMAGE_ID,INSTANCE_ID))
CREATE CACHED TABLE PUBLIC.CLOUD_IMAGE_STATE(PROJECT_ID VARCHAR(80) NOT NULL,PROFILE_ID VARCHAR(30) NOT NULL,IMAGE_ID VARCHAR(80) NOT NULL,NAME VARCHAR(80) NOT NULL,CONSTRAINT CLOUD_IMAGE_STATE_PK PRIMARY KEY(PROJECT_ID,PROFILE_ID,IMAGE_ID))
CREATE CACHED TABLE PUBLIC.CLOUD_INSTANCE_STATE(PROJECT_ID VARCHAR(80) NOT NULL,PROFILE_ID VARCHAR(30) NOT NULL,IMAGE_ID VARCHAR(80) NOT NULL,INSTANCE_ID VARCHAR(80) NOT NULL,NAME VARCHAR(80) NOT NULL,LAST_UPDATE TIMESTAMP NOT NULL,STATUS VARCHAR(30) NOT NULL,START_TIME TIMESTAMP NOT NULL,NETWORK_IDENTITY VARCHAR(80),IS_EXPIRED BIT(1),AGENT_ID INTEGER,CONSTRAINT CLOUD_INSTANCE_PK PRIMARY KEY(PROJECT_ID,PROFILE_ID,IMAGE_ID,INSTANCE_ID))
CREATE CACHED TABLE PUBLIC.CLOUD_STARTED_INSTANCE(PROFILE_ID VARCHAR(30) NOT NULL,CLOUD_CODE VARCHAR(6) NOT NULL,IMAGE_ID VARCHAR(80) NOT NULL,INSTANCE_ID VARCHAR(80) NOT NULL,LAST_UPDATE TIMESTAMP NOT NULL,CONSTRAINT CLOUD_STARTED_INSTANCE_PK PRIMARY KEY(PROFILE_ID,CLOUD_CODE,IMAGE_ID,INSTANCE_ID))
CREATE CACHED TABLE PUBLIC.CLOUD_IMAGE_WITHOUT_AGENT(PROFILE_ID VARCHAR(30) NOT NULL,CLOUD_CODE VARCHAR(6) NOT NULL,IMAGE_ID VARCHAR(80) NOT NULL,LAST_UPDATE TIMESTAMP NOT NULL,CONSTRAINT CLOUD_IMAGE_WITHOUT_AGENT_PK PRIMARY KEY(PROFILE_ID,CLOUD_CODE,IMAGE_ID))
CREATE CACHED TABLE PUBLIC.USERGROUPS(GROUP_ID VARCHAR(16) NOT NULL,NAME VARCHAR(255) NOT NULL,DESCRIPTION VARCHAR(2000),CONSTRAINT USERGROUPS_PK PRIMARY KEY(GROUP_ID),CONSTRAINT USERGROUPS_AK UNIQUE(NAME))
CREATE CACHED TABLE PUBLIC.USERGROUP_PROPERTY(GROUP_ID VARCHAR(16) NOT NULL,PROP_KEY VARCHAR(80) NOT NULL,PROP_VALUE VARCHAR(2000),CONSTRAINT USERGROUP_PROPERTY_PK PRIMARY KEY(GROUP_ID,PROP_KEY))
CREATE CACHED TABLE PUBLIC.USERS(ID BIGINT NOT NULL,USERNAME VARCHAR(60) NOT NULL,PASSWORD VARCHAR(128),NAME VARCHAR(256),EMAIL VARCHAR(256),LAST_LOGIN_TIMESTAMP BIGINT,ALGORITHM VARCHAR(20),CONSTRAINT USERS_PK PRIMARY KEY(ID),CONSTRAINT USERS_AK UNIQUE(USERNAME))
CREATE CACHED TABLE PUBLIC.USER_PROPERTY(USER_ID BIGINT NOT NULL,PROP_KEY VARCHAR(80) NOT NULL,PROP_VALUE VARCHAR(2000),CONSTRAINT USER_PROPERTY_PK PRIMARY KEY(USER_ID,PROP_KEY))
CREATE CACHED TABLE PUBLIC.USER_BLOCKS(USER_ID BIGINT NOT NULL,BLOCK_TYPE VARCHAR(80) NOT NULL,STATE VARCHAR(2048),CONSTRAINT USER_BLOCKS_PK PRIMARY KEY(USER_ID,BLOCK_TYPE))
CREATE CACHED TABLE PUBLIC.USER_NOTIFICATION_EVENTS(ID BIGINT NOT NULL,USER_ID BIGINT NOT NULL,NOTIFICATOR_TYPE VARCHAR(20) NOT NULL,EVENTS_MASK INTEGER NOT NULL,CONSTRAINT USER_NOTIFICATION_EVENTS_PK PRIMARY KEY(ID))
CREATE INDEX NOTIFICATION_EVENTS_NOTIFIER ON PUBLIC.USER_NOTIFICATION_EVENTS(NOTIFICATOR_TYPE)
CREATE INDEX NOTIFICATION_EVENTS_USER_ID ON PUBLIC.USER_NOTIFICATION_EVENTS(USER_ID)
CREATE CACHED TABLE PUBLIC.USER_WATCH_TYPE(RULE_ID BIGINT NOT NULL,USER_ID BIGINT NOT NULL,NOTIFICATOR_TYPE VARCHAR(20) NOT NULL,WATCH_TYPE INTEGER NOT NULL,WATCH_VALUE VARCHAR(80) NOT NULL,ORDER_NUM BIGINT)
CREATE INDEX USER_WATCH_TYPE_PK ON PUBLIC.USER_WATCH_TYPE(USER_ID,NOTIFICATOR_TYPE,WATCH_TYPE,WATCH_VALUE)
CREATE INDEX WATCH_TYPE_RULE_ID ON PUBLIC.USER_WATCH_TYPE(RULE_ID)
CREATE CACHED TABLE PUBLIC.USER_NOTIFICATION_DATA(USER_ID BIGINT NOT NULL,RULE_ID BIGINT NOT NULL,ADDITIONAL_DATA VARCHAR(2000),CONSTRAINT USER_NOTIF_DATA_PK PRIMARY KEY(USER_ID,RULE_ID))
CREATE INDEX USER_NOTIF_DATA_RULE_ID ON PUBLIC.USER_NOTIFICATION_DATA(RULE_ID)
CREATE CACHED TABLE PUBLIC.USERGROUP_SUBGROUPS(HOSTGROUP_ID VARCHAR(16) NOT NULL,SUBGROUP_ID VARCHAR(16) NOT NULL,CONSTRAINT USERGROUP_SUBGROUPS_PK PRIMARY KEY(HOSTGROUP_ID,SUBGROUP_ID))
CREATE CACHED TABLE PUBLIC.USERGROUP_USERS(GROUP_ID VARCHAR(16) NOT NULL,USER_ID BIGINT NOT NULL,CONSTRAINT USERGROUP_USERS_PK PRIMARY KEY(GROUP_ID,USER_ID))
CREATE CACHED TABLE PUBLIC.USERGROUP_NOTIFICATION_EVENTS(ID BIGINT NOT NULL,GROUP_ID VARCHAR(16) NOT NULL,NOTIFICATOR_TYPE VARCHAR(20) NOT NULL,EVENTS_MASK INTEGER NOT NULL,CONSTRAINT USERGROUP_NOTIFIC_EVNTS_PK PRIMARY KEY(ID))
CREATE INDEX USERGROUP_EVENTS_NOTIFIER ON PUBLIC.USERGROUP_NOTIFICATION_EVENTS(NOTIFICATOR_TYPE)
CREATE INDEX USERGROUP_EVENTS_GROUP_ID ON PUBLIC.USERGROUP_NOTIFICATION_EVENTS(GROUP_ID)
CREATE CACHED TABLE PUBLIC.USERGROUP_WATCH_TYPE(RULE_ID BIGINT NOT NULL,GROUP_ID VARCHAR(16) NOT NULL,NOTIFICATOR_TYPE VARCHAR(20) NOT NULL,WATCH_TYPE INTEGER NOT NULL,WATCH_VALUE VARCHAR(80) NOT NULL,ORDER_NUM BIGINT)
CREATE INDEX USERGROUP_WATCH_TYPE_PK ON PUBLIC.USERGROUP_WATCH_TYPE(GROUP_ID,NOTIFICATOR_TYPE,WATCH_TYPE,WATCH_VALUE)
CREATE INDEX GROUP_WATCH_TYPE_RULE_ID ON PUBLIC.USERGROUP_WATCH_TYPE(RULE_ID)
CREATE CACHED TABLE PUBLIC.USERGROUP_NOTIFICATION_DATA(GROUP_ID VARCHAR(16) NOT NULL,RULE_ID BIGINT NOT NULL,ADDITIONAL_DATA VARCHAR(2000),CONSTRAINT GROUP_NOTIF_DATA_PK PRIMARY KEY(GROUP_ID,RULE_ID))
CREATE INDEX GROUP_NOTIF_DATA_RULE_ID ON PUBLIC.USERGROUP_NOTIFICATION_DATA(RULE_ID)
CREATE CACHED TABLE PUBLIC.REMEMBER_ME(USER_KEY VARCHAR(65) NOT NULL,SECURE BIGINT NOT NULL)
CREATE CACHED TABLE PUBLIC.PERMANENT_TOKENS(ID BIGINT NOT NULL,IDENTIFIER VARCHAR(36) NOT NULL,NAME VARCHAR(128) NOT NULL,USER_ID BIGINT NOT NULL,HASHED_VALUE VARCHAR(255) NOT NULL,EXPIRATION_TIME BIGINT,CREATION_TIME BIGINT,LAST_ACCESS_TIME BIGINT,LAST_ACCESS_INFO VARCHAR(255),CONSTRAINT PERMANENT_TOKEN_PK PRIMARY KEY(ID),CONSTRAINT TOKEN_USER_ID_NAME_AK UNIQUE(USER_ID,NAME),CONSTRAINT TOKEN_IDENTIFIER_AK UNIQUE(IDENTIFIER))
CREATE CACHED TABLE PUBLIC.PERMANENT_TOKEN_PERMISSIONS(ID BIGINT NOT NULL,PROJECT_ID VARCHAR(80) NOT NULL,PERMISSION INTEGER NOT NULL,CONSTRAINT TOKEN_PERMISSIONS_PK PRIMARY KEY(ID,PROJECT_ID,PERMISSION))
CREATE CACHED TABLE PUBLIC.LONG_FILE_NAME(HASH VARCHAR(40) NOT NULL,FILE_NAME VARCHAR(16000) NOT NULL,CONSTRAINT LONG_FILE_NAME_PK PRIMARY KEY(HASH))
CREATE CACHED TABLE PUBLIC.TEST_NAMES(ID BIGINT NOT NULL,TEST_NAME VARCHAR(1024) NOT NULL,ORDER_NUM BIGINT,CONSTRAINT TEST_NAMES_PK PRIMARY KEY(ID))
CREATE INDEX ORDER_NUM_IDX ON PUBLIC.TEST_NAMES(ORDER_NUM)
CREATE CACHED TABLE PUBLIC.DATA_STORAGE_DICT(METRIC_ID BIGINT NOT NULL,VALUE_TYPE_KEY VARCHAR(200),CONSTRAINT METRIC_ID_PK PRIMARY KEY(METRIC_ID),CONSTRAINT VALUE_TYPE_KEY_INDEX UNIQUE(VALUE_TYPE_KEY))
CREATE CACHED TABLE PUBLIC.PROBLEM(PROBLEM_ID INTEGER NOT NULL,PROBLEM_TYPE VARCHAR(80) NOT NULL,PROBLEM_IDENTITY VARCHAR(60) NOT NULL,CONSTRAINT PROBLEM_PK PRIMARY KEY(PROBLEM_ID),CONSTRAINT PROBLEM_AK UNIQUE(PROBLEM_TYPE,PROBLEM_IDENTITY))
CREATE CACHED TABLE PUBLIC.AGENT_TYPE_BT_ACCESS(AGENT_TYPE_ID INTEGER NOT NULL,BUILD_TYPE_ID VARCHAR(80) NOT NULL,CONSTRAINT AGENT_TYPE_BT_ACCESS_PK PRIMARY KEY(AGENT_TYPE_ID,BUILD_TYPE_ID))
CREATE INDEX AGENT_TYPE_BT_ACCESS_BT_I ON PUBLIC.AGENT_TYPE_BT_ACCESS(BUILD_TYPE_ID)
CREATE CACHED TABLE PUBLIC.USER_PROJECTS_VISIBILITY(USER_ID BIGINT NOT NULL,PROJECT_INT_ID VARCHAR(80) NOT NULL,VISIBLE INTEGER NOT NULL,CONSTRAINT USER_PROJECTS_VISIBILITY_PK PRIMARY KEY(USER_ID,PROJECT_INT_ID))
CREATE CACHED TABLE PUBLIC.USER_PROJECTS_ORDER(USER_ID BIGINT NOT NULL,PROJECT_INT_ID VARCHAR(80) NOT NULL,ORDERNUM INTEGER,CONSTRAINT USER_PROJECTS_ORDER_PK PRIMARY KEY(USER_ID,PROJECT_INT_ID))
CREATE CACHED TABLE PUBLIC.USER_BUILD_TYPES_ORDER(USER_ID BIGINT NOT NULL,PROJECT_INT_ID VARCHAR(80) NOT NULL,BT_INT_ID VARCHAR(80) NOT NULL,ORDERNUM INTEGER NOT NULL,VISIBLE INTEGER NOT NULL,CONSTRAINT USER_BT_ORDER_PK PRIMARY KEY(USER_ID,PROJECT_INT_ID,BT_INT_ID))
CREATE CACHED TABLE PUBLIC.VCS_ROOT_INSTANCE(ID INTEGER NOT NULL,PARENT_ID INTEGER NOT NULL,SETTINGS_HASH BIGINT NOT NULL,BODY VARCHAR(16384),CONSTRAINT VCS_ROOT_INSTANCE_PK PRIMARY KEY(ID))
CREATE INDEX VCS_ROOT_INSTANCE_PARENT_IDX ON PUBLIC.VCS_ROOT_INSTANCE(PARENT_ID,SETTINGS_HASH)
CREATE CACHED TABLE PUBLIC.AGENT_POOL_PROJECT(AGENT_POOL_ID INTEGER NOT NULL,PROJECT_INT_ID VARCHAR(80) NOT NULL,CONSTRAINT AGENT_POOL_PROJECT_PK PRIMARY KEY(AGENT_POOL_ID,PROJECT_INT_ID))
CREATE CACHED TABLE PUBLIC.VCS_HISTORY(MODIFICATION_ID BIGINT NOT NULL,USER_NAME VARCHAR(255),DESCRIPTION VARCHAR(2000),CHANGE_DATE BIGINT,REGISTER_DATE BIGINT,VCS_ROOT_ID INTEGER,CHANGES_COUNT INTEGER,VERSION VARCHAR(200) NOT NULL,DISPLAY_VERSION VARCHAR(200),CONSTRAINT VCS_HISTORY_PK PRIMARY KEY(MODIFICATION_ID))
CREATE INDEX VCS_HISTORY_ROOT_ID_MOD_ID_I ON PUBLIC.VCS_HISTORY(VCS_ROOT_ID,MODIFICATION_ID)
CREATE INDEX VCS_HISTORY_DATE_I ON PUBLIC.VCS_HISTORY(REGISTER_DATE)
CREATE CACHED TABLE PUBLIC.VCS_CHANGE(MODIFICATION_ID BIGINT NOT NULL,FILE_NUM INTEGER NOT NULL,VCS_FILE_NAME VARCHAR(2000) NOT NULL,VCS_FILE_NAME_HASH VARCHAR(40),RELATIVE_FILE_NAME_POS INTEGER,RELATIVE_FILE_NAME VARCHAR(2000),RELATIVE_FILE_NAME_HASH VARCHAR(40),CHANGE_TYPE INTEGER NOT NULL,CHANGE_NAME VARCHAR(64),BEFORE_REVISION VARCHAR(200),AFTER_REVISION VARCHAR(200),CONSTRAINT VCS_CHANGE_PK PRIMARY KEY(MODIFICATION_ID,FILE_NUM))
CREATE CACHED TABLE PUBLIC.PERSONAL_VCS_HISTORY(MODIFICATION_ID BIGINT NOT NULL,MODIFICATION_HASH VARCHAR(40) NOT NULL,USER_ID BIGINT NOT NULL,DESCRIPTION VARCHAR(2000),CHANGE_DATE BIGINT NOT NULL,CHANGES_COUNT INTEGER NOT NULL,COMMIT_CHANGES INTEGER,STATUS INTEGER DEFAULT 0 NOT NULL,SCHEDULED_FOR_DELETION BIT(1) DEFAULT B'0' NOT NULL,CONSTRAINT PERSONAL_VCS_HISTORY_PK PRIMARY KEY(MODIFICATION_ID),CONSTRAINT PERSONAL_VCS_HISTORY_AK UNIQUE(MODIFICATION_HASH))
CREATE INDEX PERSONAL_VCS_HISTORY_USER_I ON PUBLIC.PERSONAL_VCS_HISTORY(USER_ID)
CREATE CACHED TABLE PUBLIC.PERSONAL_VCS_CHANGE(MODIFICATION_ID BIGINT NOT NULL,FILE_NUM INTEGER NOT NULL,VCS_FILE_NAME VARCHAR(2000) NOT NULL,VCS_FILE_NAME_HASH VARCHAR(40),RELATIVE_FILE_NAME_POS INTEGER,RELATIVE_FILE_NAME VARCHAR(2000),RELATIVE_FILE_NAME_HASH VARCHAR(40),CHANGE_TYPE INTEGER NOT NULL,CHANGE_NAME VARCHAR(64),BEFORE_REVISION VARCHAR(200),AFTER_REVISION VARCHAR(200),CONSTRAINT PERSONAL_VCS_CHANGES_PK PRIMARY KEY(MODIFICATION_ID,FILE_NUM))
CREATE CACHED TABLE PUBLIC.VCS_CHANGES_GRAPH(CHILD_MODIFICATION_ID BIGINT NOT NULL,CHILD_REVISION VARCHAR(200) NOT NULL,PARENT_NUM INTEGER NOT NULL,PARENT_MODIFICATION_ID BIGINT,PARENT_REVISION VARCHAR(200) NOT NULL,CONSTRAINT VCS_CHANGES_GRAPH_PK PRIMARY KEY(CHILD_MODIFICATION_ID,PARENT_NUM))
CREATE INDEX VCS_CHANGES_GRAPH_PARENT_I ON PUBLIC.VCS_CHANGES_GRAPH(PARENT_MODIFICATION_ID)
CREATE CACHED TABLE PUBLIC.VCS_CHANGE_ATTRS(MODIFICATION_ID BIGINT NOT NULL,ATTR_NAME VARCHAR(200) NOT NULL,ATTR_VALUE VARCHAR(1000),CONSTRAINT VCS_CHANGE_ATTRS_PK PRIMARY KEY(MODIFICATION_ID,ATTR_NAME))
CREATE CACHED TABLE PUBLIC.VCS_ROOT_FIRST_REVISION(BUILD_TYPE_ID VARCHAR(80) NOT NULL,PARENT_ROOT_ID INTEGER NOT NULL,SETTINGS_HASH BIGINT NOT NULL,VCS_REVISION VARCHAR(200) NOT NULL,CONSTRAINT VCS_ROOT_FIRST_REVISION_PK PRIMARY KEY(BUILD_TYPE_ID,PARENT_ROOT_ID,SETTINGS_HASH))
CREATE CACHED TABLE PUBLIC.VCS_USERNAME(USER_ID BIGINT NOT NULL,VCS_NAME VARCHAR(60) NOT NULL,PARENT_VCS_ROOT_ID INTEGER NOT NULL,ORDER_NUM INTEGER NOT NULL,USERNAME VARCHAR(255) NOT NULL,CONSTRAINT VCS_USERNAME_PK PRIMARY KEY(USER_ID,VCS_NAME,PARENT_VCS_ROOT_ID,ORDER_NUM),CONSTRAINT VCS_USERNAME_AK UNIQUE(USER_ID,VCS_NAME,PARENT_VCS_ROOT_ID,USERNAME))
CREATE INDEX VCS_USERNAME_USER_IE ON PUBLIC.VCS_USERNAME(VCS_NAME,PARENT_VCS_ROOT_ID,USERNAME)
CREATE CACHED TABLE PUBLIC.BUILD_STATE(ID BIGINT NOT NULL,BUILD_ID BIGINT,BUILD_TYPE_ID VARCHAR(80),MODIFICATION_ID BIGINT,CHAIN_MODIFICATION_ID BIGINT,PERSONAL_MODIFICATION_ID BIGINT,PERSONAL_USER_ID BIGINT,IS_PERSONAL BIT(1) DEFAULT B'0' NOT NULL,IS_CANCELED BIT(1) DEFAULT B'0' NOT NULL,IS_CHANGES_DETACHED BIT(1) DEFAULT B'0' NOT NULL,IS_DELETED BIT(1) DEFAULT B'0' NOT NULL,BRANCH_NAME VARCHAR(255),QUEUED_TIME BIGINT,REMOVE_FROM_QUEUE_TIME BIGINT,CONSTRAINT BUILD_STATE_PK PRIMARY KEY(ID))
CREATE INDEX BUILD_STATE_BUILD_I ON PUBLIC.BUILD_STATE(BUILD_ID,IS_DELETED,BRANCH_NAME,IS_PERSONAL)
CREATE INDEX BUILD_STATE_BUILD_TYPE_I ON PUBLIC.BUILD_STATE(BUILD_TYPE_ID,IS_DELETED,BRANCH_NAME,IS_PERSONAL)
CREATE INDEX BUILD_STATE_MOD_I ON PUBLIC.BUILD_STATE(MODIFICATION_ID)
CREATE INDEX BUILD_STATE_PUSER_I ON PUBLIC.BUILD_STATE(PERSONAL_USER_ID)
CREATE INDEX BUILD_STATE_PMOD_I ON PUBLIC.BUILD_STATE(PERSONAL_MODIFICATION_ID)
CREATE INDEX BUILD_STATE_REM_QUEUE_TIME_I ON PUBLIC.BUILD_STATE(REMOVE_FROM_QUEUE_TIME)
CREATE CACHED TABLE PUBLIC.RUNNING(BUILD_ID BIGINT NOT NULL,AGENT_ID INTEGER,BUILD_TYPE_ID VARCHAR(80),BUILD_START_TIME_AGENT BIGINT,BUILD_START_TIME_SERVER BIGINT,BUILD_FINISH_TIME_SERVER BIGINT,LAST_BUILD_ACTIVITY_TIME BIGINT,IS_PERSONAL INTEGER,BUILD_NUMBER VARCHAR(256),BUILD_COUNTER BIGINT,REQUESTOR VARCHAR(1024),ACCESS_CODE VARCHAR(60),QUEUED_AG_RESTR_TYPE_ID INTEGER,QUEUED_AG_RESTR_ID INTEGER,BUILD_STATE_ID BIGINT,AGENT_TYPE_ID INTEGER,USER_STATUS_TEXT VARCHAR(256),PROGRESS_TEXT VARCHAR(1024),CURRENT_PATH_TEXT VARCHAR(2048),CONSTRAINT RUNNING_PK PRIMARY KEY(BUILD_ID))
CREATE INDEX RUNNING_STATE_ID ON PUBLIC.RUNNING(BUILD_STATE_ID)
CREATE CACHED TABLE PUBLIC.HISTORY(BUILD_ID BIGINT NOT NULL,AGENT_NAME VARCHAR(80),BUILD_TYPE_ID VARCHAR(80),BRANCH_NAME VARCHAR(255),BUILD_START_TIME_SERVER BIGINT,BUILD_START_TIME_AGENT BIGINT,BUILD_FINISH_TIME_SERVER BIGINT,REMOVE_FROM_QUEUE_TIME BIGINT,QUEUED_TIME BIGINT,STATUS INTEGER,STATUS_TEXT VARCHAR(256),USER_STATUS_TEXT VARCHAR(256),PIN INTEGER,IS_PERSONAL INTEGER,IS_CANCELED INTEGER,BUILD_NUMBER VARCHAR(256),REQUESTOR VARCHAR(1024),BUILD_STATE_ID BIGINT,AGENT_TYPE_ID INTEGER,CONSTRAINT HISTORY_BUILD_ID_PK PRIMARY KEY(BUILD_ID))
CREATE INDEX HISTORY_START_TIME_IDX ON PUBLIC.HISTORY(BUILD_START_TIME_SERVER)
CREATE INDEX HISTORY_FINISH_TIME_IDX ON PUBLIC.HISTORY(BUILD_FINISH_TIME_SERVER)
CREATE INDEX HISTORY_REMOVE_FROM_Q_TIME_I ON PUBLIC.HISTORY(REMOVE_FROM_QUEUE_TIME)
CREATE INDEX HISTORY_BUILD_TYPE_ID_I ON PUBLIC.HISTORY(BUILD_TYPE_ID,BRANCH_NAME,IS_CANCELED,PIN)
CREATE INDEX HISTORY_BUILD_STATE_ID_I ON PUBLIC.HISTORY(BUILD_STATE_ID)
CREATE INDEX HISTORY_AGENT_FINISH_TIME_I ON PUBLIC.HISTORY(AGENT_NAME,BUILD_FINISH_TIME_SERVER)
CREATE INDEX HISTORY_BUILD_NUMBER_I ON PUBLIC.HISTORY(BUILD_NUMBER)
CREATE INDEX HISTORY_AGENT_TYPE_B_ID_I ON PUBLIC.HISTORY(AGENT_TYPE_ID,BUILD_ID)
CREATE CACHED TABLE PUBLIC.LIGHT_HISTORY(BUILD_ID BIGINT NOT NULL,AGENT_NAME VARCHAR(80),BUILD_TYPE_ID VARCHAR(80),BUILD_START_TIME_SERVER BIGINT,BUILD_START_TIME_AGENT BIGINT,BUILD_FINISH_TIME_SERVER BIGINT,STATUS INTEGER,STATUS_TEXT VARCHAR(256),USER_STATUS_TEXT VARCHAR(256),PIN INTEGER,IS_PERSONAL INTEGER,IS_CANCELED INTEGER,BUILD_NUMBER VARCHAR(256),REQUESTOR VARCHAR(1024),QUEUED_TIME BIGINT,REMOVE_FROM_QUEUE_TIME BIGINT,BUILD_STATE_ID BIGINT,AGENT_TYPE_ID INTEGER,BRANCH_NAME VARCHAR(255),CONSTRAINT LIGHT_HISTORY_PK PRIMARY KEY(BUILD_ID))
CREATE INDEX START_TIME_INDEX_LIGHT ON PUBLIC.LIGHT_HISTORY(BUILD_START_TIME_SERVER)
CREATE INDEX LIGHT_HISTORY_FINISH_TIME_I ON PUBLIC.LIGHT_HISTORY(BUILD_FINISH_TIME_SERVER)
CREATE INDEX STATS_OPTIMIZED_INDEX ON PUBLIC.LIGHT_HISTORY(BUILD_TYPE_ID,STATUS,IS_CANCELED,BRANCH_NAME)
CREATE INDEX LIGHT_HISTORY_AGT_B_I ON PUBLIC.LIGHT_HISTORY(AGENT_TYPE_ID,BUILD_ID)
CREATE CACHED TABLE PUBLIC.BUILD_PROJECT(BUILD_ID BIGINT NOT NULL,PROJECT_LEVEL INTEGER NOT NULL,PROJECT_INT_ID VARCHAR(80) NOT NULL,CONSTRAINT BUILD_PROJECT_PK PRIMARY KEY(BUILD_ID,PROJECT_LEVEL))
CREATE INDEX BUILD_PROJECT_PROJECT_IDX ON PUBLIC.BUILD_PROJECT(PROJECT_INT_ID)
CREATE CACHED TABLE PUBLIC.BUILD_DEPENDENCY(BUILD_STATE_ID BIGINT NOT NULL,DEPENDS_ON BIGINT NOT NULL,DEPENDENCY_OPTIONS INTEGER,CONSTRAINT BUILD_DEPENDENCY_PK PRIMARY KEY(BUILD_STATE_ID,DEPENDS_ON))
CREATE INDEX BUILD_DEPENDENCY_AK ON PUBLIC.BUILD_DEPENDENCY(DEPENDS_ON,BUILD_STATE_ID)
CREATE CACHED TABLE PUBLIC.BUILD_ATTRS(BUILD_STATE_ID BIGINT NOT NULL,ATTR_NAME VARCHAR(70) NOT NULL,ATTR_VALUE VARCHAR(1000),ATTR_NUM_VALUE BIGINT,CONSTRAINT BUILD_ATTRS_PK PRIMARY KEY(BUILD_STATE_ID,ATTR_NAME))
CREATE INDEX BUILD_ATTRS_NUM_I ON PUBLIC.BUILD_ATTRS(ATTR_NUM_VALUE,ATTR_NAME,BUILD_STATE_ID)
CREATE INDEX BUILD_ATTRS_NAME_IDX ON PUBLIC.BUILD_ATTRS(ATTR_NAME)
CREATE CACHED TABLE PUBLIC.BUILD_DATA_STORAGE(BUILD_ID BIGINT NOT NULL,METRIC_ID BIGINT NOT NULL,METRIC_VALUE DECIMAL(19,6) NOT NULL,CONSTRAINT BUILD_DATA_STORAGE_PK PRIMARY KEY(BUILD_ID,METRIC_ID))
CREATE CACHED TABLE PUBLIC.CANCELED_INFO(BUILD_ID BIGINT NOT NULL,USER_ID BIGINT,DESCRIPTION VARCHAR(256),INTERRUPT_TYPE INTEGER,CONSTRAINT CANCELED_INFO_PK PRIMARY KEY(BUILD_ID))
CREATE CACHED TABLE PUBLIC.TEST_INFO(BUILD_ID BIGINT NOT NULL,TEST_ID INTEGER NOT NULL,TEST_NAME_ID BIGINT,STATUS INTEGER,DURATION INTEGER DEFAULT 0 NOT NULL,CONSTRAINT TEST_INFO_PK PRIMARY KEY(BUILD_ID,TEST_ID))
CREATE INDEX TEST_NAME_ID_IDX ON PUBLIC.TEST_INFO(TEST_NAME_ID)
CREATE CACHED TABLE PUBLIC.TEST_METADATA_DICT(KEY_ID BIGINT NOT NULL,NAME_DIGEST VARCHAR(32) NOT NULL,NAME VARCHAR(512) NOT NULL,CONSTRAINT TEST_METADATA_DICT_PK PRIMARY KEY(KEY_ID),CONSTRAINT TEST_METADATA_DICT_AK UNIQUE(NAME_DIGEST))
CREATE CACHED TABLE PUBLIC.TEST_METADATA_TYPES(TYPE_ID INTEGER NOT NULL,NAME VARCHAR(64) NOT NULL,CONSTRAINT TEST_METADATA_TYPES_PK PRIMARY KEY(TYPE_ID),CONSTRAINT TEST_METADATA_TYPES_AK UNIQUE(NAME))
CREATE CACHED TABLE PUBLIC.TEST_METADATA(BUILD_ID BIGINT NOT NULL,TEST_ID INTEGER NOT NULL,TEST_NAME_ID BIGINT NOT NULL,KEY_ID BIGINT NOT NULL,TYPE_ID INTEGER,STR_VALUE VARCHAR(1024),NUM_VALUE DECIMAL(19,6),CONSTRAINT TEST_METADATA_PK PRIMARY KEY(BUILD_ID,TEST_ID,KEY_ID))
CREATE INDEX TEST_METADATANAME_NAME_IDX ON PUBLIC.TEST_METADATA(TEST_NAME_ID)
CREATE CACHED TABLE PUBLIC.BUILD_PROBLEM(BUILD_STATE_ID BIGINT NOT NULL,PROBLEM_ID INTEGER NOT NULL,PROBLEM_DESCRIPTION VARCHAR(4000),CONSTRAINT BUILD_PROBLEM_PK PRIMARY KEY(BUILD_STATE_ID,PROBLEM_ID))
CREATE CACHED TABLE PUBLIC.BUILD_PROBLEM_ATTRIBUTE(BUILD_STATE_ID BIGINT NOT NULL,PROBLEM_ID INTEGER NOT NULL,ATTR_NAME VARCHAR(60) NOT NULL,ATTR_VALUE VARCHAR(2000) NOT NULL,CONSTRAINT BUILD_PROBLEM_ATTRIBUTE_PK PRIMARY KEY(BUILD_STATE_ID,PROBLEM_ID,ATTR_NAME))
CREATE CACHED TABLE PUBLIC.BUILD_ARTIFACT_DEPENDENCY(ARTIF_DEP_ID VARCHAR(40) NOT NULL,BUILD_STATE_ID BIGINT,SOURCE_BUILD_TYPE_ID VARCHAR(80),REVISION_RULE VARCHAR(80),BRANCH VARCHAR(255),SRC_PATHS VARCHAR(40960))
CREATE INDEX BUILD_ARTIF_DEP_STATE_ID ON PUBLIC.BUILD_ARTIFACT_DEPENDENCY(BUILD_STATE_ID)
CREATE CACHED TABLE PUBLIC.FINAL_ARTIFACT_DEPENDENCY(ARTIF_DEP_ID VARCHAR(40) NOT NULL,BUILD_STATE_ID BIGINT,SOURCE_BUILD_TYPE_ID VARCHAR(80),REVISION_RULE VARCHAR(80),BRANCH VARCHAR(255),SRC_PATHS VARCHAR(40960))
CREATE INDEX FINAL_ARTIF_DEP_STATE_ID ON PUBLIC.FINAL_ARTIFACT_DEPENDENCY(BUILD_STATE_ID)
CREATE CACHED TABLE PUBLIC.BUILD_TYPE_VCS_CHANGE(MODIFICATION_ID BIGINT NOT NULL,BUILD_TYPE_ID VARCHAR(80) NOT NULL,CHANGE_TYPE INTEGER,CONSTRAINT BUILD_TYPE_VCS_CHANGE_UI UNIQUE(MODIFICATION_ID,BUILD_TYPE_ID))
CREATE INDEX BUILD_TYPE_VCS_CHANGE_BTID ON PUBLIC.BUILD_TYPE_VCS_CHANGE(BUILD_TYPE_ID)
CREATE CACHED TABLE PUBLIC.BUILD_TYPE_EDGE_RELATION(CHILD_MODIFICATION_ID BIGINT NOT NULL,BUILD_TYPE_ID VARCHAR(80) NOT NULL,PARENT_NUM INTEGER NOT NULL,CHANGE_TYPE INTEGER,CONSTRAINT BUILD_TYPE_EDGE_RELATION_PK PRIMARY KEY(CHILD_MODIFICATION_ID,BUILD_TYPE_ID,PARENT_NUM))
CREATE INDEX BT_EDGE_RELATION_BTID ON PUBLIC.BUILD_TYPE_EDGE_RELATION(BUILD_TYPE_ID)
CREATE CACHED TABLE PUBLIC.IDS_GROUP(ID INTEGER NOT NULL,GROUP_HASH VARCHAR(80) NOT NULL,CONSTRAINT IDS_GROUP_PK PRIMARY KEY(ID))
CREATE INDEX IDS_GROUP_HASH_IDX ON PUBLIC.IDS_GROUP(GROUP_HASH)
CREATE CACHED TABLE PUBLIC.IDS_GROUP_ENTITY_ID(GROUP_ID INTEGER NOT NULL,ENTITY_ID VARCHAR(160) NOT NULL)
CREATE INDEX IDS_GROUP_IDX ON PUBLIC.IDS_GROUP_ENTITY_ID(GROUP_ID,ENTITY_ID)
CREATE CACHED TABLE PUBLIC.BUILD_TYPE_GROUP_VCS_CHANGE(MODIFICATION_ID BIGINT NOT NULL,GROUP_ID INTEGER NOT NULL,CHANGE_TYPE INTEGER)
CREATE INDEX BT_GRP_VCS_CHANGE_MOD_IDX ON PUBLIC.BUILD_TYPE_GROUP_VCS_CHANGE(MODIFICATION_ID)
CREATE INDEX BT_GRP_VCS_CHANGE_GRP_MOD_IDX ON PUBLIC.BUILD_TYPE_GROUP_VCS_CHANGE(GROUP_ID,MODIFICATION_ID)
CREATE CACHED TABLE PUBLIC.BUILD_CHECKOUT_RULES(BUILD_STATE_ID BIGINT NOT NULL,BUILD_TYPE_ID VARCHAR(80) NOT NULL,VCS_ROOT_ID INTEGER NOT NULL,CHECKOUT_RULES VARCHAR(2096),CONSTRAINT BUILD_CHECKOUT_RULES_PK PRIMARY KEY(BUILD_STATE_ID,BUILD_TYPE_ID,VCS_ROOT_ID))
CREATE INDEX BUILD_CHECKOUT_RULES_VCS_R_I ON PUBLIC.BUILD_CHECKOUT_RULES(VCS_ROOT_ID)
CREATE CACHED TABLE PUBLIC.MUTE_INFO(MUTE_ID INTEGER NOT NULL,MUTING_USER_ID BIGINT NOT NULL,MUTING_TIME TIMESTAMP NOT NULL,MUTING_COMMENT VARCHAR(2000),SCOPE CHARACTER(1) NOT NULL,PROJECT_INT_ID VARCHAR(80) NOT NULL,BUILD_ID BIGINT,UNMUTE_WHEN_FIXED BIT(1),UNMUTE_BY_TIME TIMESTAMP,CONSTRAINT MUTE_INFO_PK PRIMARY KEY(MUTE_ID),CONSTRAINT MUTE_INFO_AK UNIQUE(PROJECT_INT_ID,MUTE_ID))
CREATE CACHED TABLE PUBLIC.MUTE_INFO_BT(MUTE_ID INTEGER NOT NULL,BUILD_TYPE_ID VARCHAR(80) NOT NULL,CONSTRAINT MUTE_INFO_BT_PK PRIMARY KEY(MUTE_ID,BUILD_TYPE_ID))
CREATE CACHED TABLE PUBLIC.MUTE_INFO_TEST(MUTE_ID INTEGER NOT NULL,TEST_NAME_ID BIGINT NOT NULL,CONSTRAINT MUTE_INFO_TEST_PK PRIMARY KEY(MUTE_ID,TEST_NAME_ID))
CREATE CACHED TABLE PUBLIC.MUTE_TEST_IN_PROJ(MUTE_ID INTEGER NOT NULL,PROJECT_INT_ID VARCHAR(80) NOT NULL,TEST_NAME_ID BIGINT NOT NULL,CONSTRAINT MUTE_TEST_IN_PROJ_PK PRIMARY KEY(MUTE_ID,PROJECT_INT_ID,TEST_NAME_ID))
CREATE INDEX MUTE_TEST_IN_PROJ_IE ON PUBLIC.MUTE_TEST_IN_PROJ(PROJECT_INT_ID,TEST_NAME_ID,MUTE_ID)
CREATE CACHED TABLE PUBLIC.MUTE_TEST_IN_BT(MUTE_ID INTEGER NOT NULL,BUILD_TYPE_ID VARCHAR(80) NOT NULL,TEST_NAME_ID BIGINT NOT NULL,CONSTRAINT MUTE_TEST_IN_BT_PK PRIMARY KEY(MUTE_ID,BUILD_TYPE_ID,TEST_NAME_ID))
CREATE INDEX MUTE_TEST_IN_BT_IE ON PUBLIC.MUTE_TEST_IN_BT(BUILD_TYPE_ID,TEST_NAME_ID,MUTE_ID)
CREATE CACHED TABLE PUBLIC.MUTE_INFO_PROBLEM(MUTE_ID INTEGER NOT NULL,PROBLEM_ID INTEGER NOT NULL,CONSTRAINT MUTE_INFO_PROBLEM_PK PRIMARY KEY(MUTE_ID,PROBLEM_ID))
CREATE CACHED TABLE PUBLIC.MUTE_PROBLEM_IN_PROJ(MUTE_ID INTEGER NOT NULL,PROJECT_INT_ID VARCHAR(80) NOT NULL,PROBLEM_ID INTEGER NOT NULL,CONSTRAINT MUTE_PROBLEM_IN_PROJ_PK PRIMARY KEY(MUTE_ID,PROJECT_INT_ID,PROBLEM_ID))
CREATE INDEX MUTE_PROBLEM_IN_PROJ_IE ON PUBLIC.MUTE_PROBLEM_IN_PROJ(PROJECT_INT_ID,PROBLEM_ID,MUTE_ID)
CREATE CACHED TABLE PUBLIC.MUTE_PROBLEM_IN_BT(MUTE_ID INTEGER NOT NULL,BUILD_TYPE_ID VARCHAR(80) NOT NULL,PROBLEM_ID INTEGER NOT NULL,CONSTRAINT MUTE_PROBLEM_IN_BT_PK PRIMARY KEY(MUTE_ID,BUILD_TYPE_ID,PROBLEM_ID))
CREATE INDEX MUTE_PROBLEM_IN_BT_IE ON PUBLIC.MUTE_PROBLEM_IN_BT(BUILD_TYPE_ID,PROBLEM_ID,MUTE_ID)
CREATE CACHED TABLE PUBLIC.BUILD_PROBLEM_MUTED(BUILD_STATE_ID BIGINT NOT NULL,PROBLEM_ID INTEGER NOT NULL,MUTE_ID INTEGER,CONSTRAINT BUILD_PROBLEM_MUTED_PK PRIMARY KEY(BUILD_STATE_ID,PROBLEM_ID))
CREATE INDEX BUILD_PROBLEM_MUTE_ID ON PUBLIC.BUILD_PROBLEM_MUTED(MUTE_ID)
CREATE CACHED TABLE PUBLIC.TEST_MUTED(BUILD_ID BIGINT NOT NULL,TEST_NAME_ID BIGINT NOT NULL,MUTE_ID INTEGER NOT NULL,CONSTRAINT TEST_MUTED_PK PRIMARY KEY(BUILD_ID,TEST_NAME_ID,MUTE_ID))
CREATE INDEX TEST_MUTED_MUTE_ID ON PUBLIC.TEST_MUTED(MUTE_ID)
CREATE CACHED TABLE PUBLIC.TEST_FAILURE_RATE(BUILD_TYPE_ID VARCHAR(80) NOT NULL,TEST_NAME_ID BIGINT NOT NULL,SUCCESS_COUNT INTEGER,FAILURE_COUNT INTEGER,LAST_FAILURE_TIME BIGINT,CONSTRAINT TEST_FAILURE_RATE_PK PRIMARY KEY(BUILD_TYPE_ID,TEST_NAME_ID))
CREATE INDEX TEST_FAILURE_RATE_TN_IDX ON PUBLIC.TEST_FAILURE_RATE(TEST_NAME_ID)
CREATE CACHED TABLE PUBLIC.BUILD_QUEUE(BUILD_TYPE_ID VARCHAR(80),AGENT_RESTRICTOR_TYPE_ID INTEGER,AGENT_RESTRICTOR_ID INTEGER,REQUESTOR VARCHAR(1024),BUILD_STATE_ID BIGINT)
CREATE INDEX BUILD_QUEUE_BUILD_STATE_ID ON PUBLIC.BUILD_QUEUE(BUILD_STATE_ID)
CREATE CACHED TABLE PUBLIC.BUILD_QUEUE_ORDER(VERSION BIGINT NOT NULL,LINE_NUM INTEGER NOT NULL,PROMOTION_IDS VARCHAR(2000),CONSTRAINT BUILD_QUEUE_ORDER_PK PRIMARY KEY(VERSION,LINE_NUM))
CREATE CACHED TABLE PUBLIC.STATS(BUILD_ID BIGINT NOT NULL,TEST_COUNT INTEGER,CONSTRAINT STATS_PK PRIMARY KEY(BUILD_ID))
CREATE CACHED TABLE PUBLIC.FAILED_TESTS_OUTPUT(BUILD_ID BIGINT NOT NULL,TEST_ID INTEGER NOT NULL,PROBLEM_DESCRIPTION VARCHAR(256),STD_OUTPUT VARCHAR(40960),ERROR_OUTPUT VARCHAR(40960),STACKTRACE VARCHAR(40960),EXPECTED VARCHAR(40960),ACTUAL VARCHAR(40960),CONSTRAINT FAILED_TESTS_OUTPUT_PK PRIMARY KEY(BUILD_ID,TEST_ID))
CREATE CACHED TABLE PUBLIC.COMPILER_OUTPUT(BUILD_ID BIGINT,MESSAGE_ORDER INTEGER,MESSAGE VARCHAR(40960))
CREATE INDEX CO_BUILD_ID_INDEX ON PUBLIC.COMPILER_OUTPUT(BUILD_ID)
CREATE CACHED TABLE PUBLIC.IGNORED_TESTS(BUILD_ID BIGINT,TEST_ID INTEGER,IGNORE_REASON VARCHAR(2000))
CREATE INDEX IGNORED_TESTS_BUILD_ID ON PUBLIC.IGNORED_TESTS(BUILD_ID)
CREATE CACHED TABLE PUBLIC.DOWNLOADED_ARTIFACTS(TARGET_BUILD_ID BIGINT,SOURCE_BUILD_ID BIGINT,DOWNLOAD_TIMESTAMP BIGINT,ARTIFACT_PATH VARCHAR(8192))
CREATE INDEX DOWNLOADED_ARTIFACTS_SOURCE_ID ON PUBLIC.DOWNLOADED_ARTIFACTS(SOURCE_BUILD_ID)
CREATE INDEX DOWNLOADED_ARTIFACTS_TS_ID ON PUBLIC.DOWNLOADED_ARTIFACTS(TARGET_BUILD_ID,SOURCE_BUILD_ID)
CREATE CACHED TABLE PUBLIC.BUILD_REVISIONS(BUILD_STATE_ID BIGINT NOT NULL,VCS_ROOT_ID INTEGER NOT NULL,VCS_REVISION VARCHAR(200) NOT NULL,VCS_REVISION_DISPLAY_NAME VARCHAR(200),VCS_BRANCH_NAME VARCHAR(255),MODIFICATION_ID BIGINT,VCS_ROOT_TYPE INTEGER,CHECKOUT_MODE INTEGER,CONSTRAINT BUILD_REVISIONS_PK PRIMARY KEY(BUILD_STATE_ID,VCS_ROOT_ID))
CREATE INDEX BUILD_REVISIONS_VCS_ROOT_I ON PUBLIC.BUILD_REVISIONS(VCS_ROOT_ID)
CREATE INDEX BUILD_REVISIONS_MOD_ID_I ON PUBLIC.BUILD_REVISIONS(MODIFICATION_ID)
CREATE CACHED TABLE PUBLIC.DEFAULT_BUILD_PARAMETERS(BUILD_STATE_ID BIGINT,PARAM_NAME VARCHAR(2000),PARAM_VALUE VARCHAR(16000))
CREATE INDEX DEF_BUILD_PARAMS_STATE_ID ON PUBLIC.DEFAULT_BUILD_PARAMETERS(BUILD_STATE_ID)
CREATE CACHED TABLE PUBLIC.USER_BUILD_PARAMETERS(BUILD_STATE_ID BIGINT,PARAM_NAME VARCHAR(2000),PARAM_VALUE VARCHAR(16000))
CREATE INDEX USER_BUILD_PARAMS_STATE_ID ON PUBLIC.USER_BUILD_PARAMETERS(BUILD_STATE_ID)
CREATE CACHED TABLE PUBLIC.BUILD_LABELS(BUILD_ID BIGINT NOT NULL,VCS_ROOT_ID INTEGER NOT NULL,LABEL VARCHAR(80),STATUS INTEGER DEFAULT 0,ERROR_MESSAGE VARCHAR(256),CONSTRAINT BUILD_LABELS_PK PRIMARY KEY(BUILD_ID,VCS_ROOT_ID))
CREATE INDEX BUILD_LABELS_VCS_ROOT_I ON PUBLIC.BUILD_LABELS(VCS_ROOT_ID)
CREATE CACHED TABLE PUBLIC.PERSONAL_BUILD_RELATIVE_PATH(BUILD_ID BIGINT,ORIGINAL_PATH_HASH BIGINT,RELATIVE_PATH VARCHAR(16000),CONSTRAINT PERSONAL_BUILD_RELATIVE_P_AK UNIQUE(BUILD_ID,ORIGINAL_PATH_HASH))
CREATE CACHED TABLE PUBLIC.RESPONSIBILITIES(PROBLEM_ID VARCHAR(80) NOT NULL,STATE INTEGER NOT NULL,RESPONSIBLE_USER_ID BIGINT NOT NULL,REPORTER_USER_ID BIGINT,TIMESTMP BIGINT,REMOVE_METHOD INTEGER DEFAULT 0 NOT NULL,COMMENTS VARCHAR(4096),CONSTRAINT RESPONSIBILITIES_PK PRIMARY KEY(PROBLEM_ID))
CREATE INDEX RESPONSIBILITIES_REPORTER ON PUBLIC.RESPONSIBILITIES(REPORTER_USER_ID)
CREATE INDEX RESPONSIBILITIES_ASSIGNEE ON PUBLIC.RESPONSIBILITIES(RESPONSIBLE_USER_ID)
CREATE CACHED TABLE PUBLIC.BUILD_STATE_TAG(BUILD_STATE_ID BIGINT NOT NULL,TAG VARCHAR(255) NOT NULL,CONSTRAINT BUILD_STATE_TAG_PK PRIMARY KEY(BUILD_STATE_ID,TAG))
CREATE INDEX BUILD_STATE_TAG_IE1 ON PUBLIC.BUILD_STATE_TAG(TAG,BUILD_STATE_ID)
CREATE CACHED TABLE PUBLIC.BUILD_STATE_PRIVATE_TAG(BUILD_STATE_ID BIGINT NOT NULL,OWNER BIGINT NOT NULL,TAG VARCHAR(255) NOT NULL,CONSTRAINT BUILD_STATE_PRIVATE_TAG_PK PRIMARY KEY(BUILD_STATE_ID,OWNER,TAG))
CREATE INDEX BUILD_STATE_PRIVATE_TAG_IE1 ON PUBLIC.BUILD_STATE_PRIVATE_TAG(OWNER,BUILD_STATE_ID)
CREATE CACHED TABLE PUBLIC.BUILD_OVERRIDEN_ROOTS(BUILD_STATE_ID BIGINT NOT NULL,ORIGINAL_VCS_ROOT_ID INTEGER NOT NULL,SUBSTITUTION_VCS_ROOT_ID INTEGER NOT NULL,CONSTRAINT BUILD_OVERRIDEN_ROOTS_PK PRIMARY KEY(BUILD_STATE_ID,ORIGINAL_VCS_ROOT_ID))
CREATE INDEX BUILD_SUBST_ROOT_INDEX ON PUBLIC.BUILD_OVERRIDEN_ROOTS(SUBSTITUTION_VCS_ROOT_ID)
CREATE INDEX BUILD_ORIG_ROOT_INDEX ON PUBLIC.BUILD_OVERRIDEN_ROOTS(ORIGINAL_VCS_ROOT_ID)
CREATE CACHED TABLE PUBLIC.USER_ROLES(USER_ID BIGINT NOT NULL,ROLE_ID VARCHAR(80) NOT NULL,PROJECT_INT_ID VARCHAR(80),CONSTRAINT USER_ROLES_UI UNIQUE(USER_ID,ROLE_ID,PROJECT_INT_ID))
CREATE CACHED TABLE PUBLIC.USERGROUP_ROLES(GROUP_ID VARCHAR(16) NOT NULL,ROLE_ID VARCHAR(80) NOT NULL,PROJECT_INT_ID VARCHAR(80),CONSTRAINT USERGROUP_ROLES_UI UNIQUE(GROUP_ID,ROLE_ID,PROJECT_INT_ID))
CREATE CACHED TABLE PUBLIC.INSPECTION_INFO(ID BIGINT NOT NULL,INSPECTION_ID VARCHAR(255),INSPECTION_NAME VARCHAR(255),INSPECTION_DESC VARCHAR(4000),GROUP_NAME VARCHAR(255),CONSTRAINT INSPECTION_INFO_PK PRIMARY KEY(ID),CONSTRAINT INSPECTION_INFO_AK UNIQUE(INSPECTION_ID))
CREATE CACHED TABLE PUBLIC.INSPECTION_DATA(HASH BIGINT NOT NULL,RESULT VARCHAR(4000),SEVERITY INTEGER,TYPE_PATTERN INTEGER,FQNAME VARCHAR(4000),FILE_NAME VARCHAR(255),PARENT_FQNAMES VARCHAR(4000),PARENT_TYPE_PATTERNS VARCHAR(20),MODULE_NAME VARCHAR(40),INSPECTION_ID BIGINT,IS_LOCAL INTEGER,USED INTEGER DEFAULT 1 NOT NULL,CONSTRAINT INSPECTION_DATA_PK PRIMARY KEY(HASH))
CREATE INDEX INSPECTION_DATA_FILE_INDEX ON PUBLIC.INSPECTION_DATA(FILE_NAME)
CREATE INDEX INSPECTION_DATA_INSP_INDEX ON PUBLIC.INSPECTION_DATA(INSPECTION_ID)
CREATE CACHED TABLE PUBLIC.INSPECTION_FIXES(HASH BIGINT NOT NULL,HINT VARCHAR(255))
CREATE INDEX INSPECTION_FIXES_HASH_INDEX ON PUBLIC.INSPECTION_FIXES(HASH)
CREATE CACHED TABLE PUBLIC.INSPECTION_RESULTS(BUILD_ID BIGINT NOT NULL,HASH BIGINT NOT NULL,LINE INTEGER NOT NULL)
CREATE INDEX INSPECTION_RESULTS_HASH_INDEX ON PUBLIC.INSPECTION_RESULTS(HASH)
CREATE INDEX INSPECTION_RESULTS_BUILDHASH_I ON PUBLIC.INSPECTION_RESULTS(BUILD_ID,HASH)
CREATE CACHED TABLE PUBLIC.INSPECTION_STATS(BUILD_ID BIGINT NOT NULL,TOTAL INTEGER,NEW_TOTAL INTEGER,OLD_TOTAL INTEGER,ERRORS INTEGER,NEW_ERRORS INTEGER,OLD_ERRORS INTEGER,CONSTRAINT INSPECTION_STATS_PK PRIMARY KEY(BUILD_ID))
CREATE CACHED TABLE PUBLIC.INSPECTION_DIFF(BUILD_ID BIGINT NOT NULL,HASH BIGINT NOT NULL,CONSTRAINT INSPECTION_DIFF_AK UNIQUE(BUILD_ID,HASH))
CREATE INDEX INSPECTION_DIFF_HASH_INDEX ON PUBLIC.INSPECTION_DIFF(HASH)
CREATE CACHED TABLE PUBLIC.PROJECT_FILES(FILE_ID BIGINT NOT NULL,FILE_NAME VARCHAR(255) NOT NULL,CONSTRAINT PROJECT_FILES_PK PRIMARY KEY(FILE_ID),CONSTRAINT PROJECT_FILES_AK UNIQUE(FILE_NAME))
CREATE CACHED TABLE PUBLIC.DUPLICATE_RESULTS(ID BIGINT NOT NULL,BUILD_ID BIGINT NOT NULL,HASH INTEGER NOT NULL,COST INTEGER,CONSTRAINT DUPLICATE_RESULTS_PK PRIMARY KEY(ID))
CREATE INDEX DUPLICATE_RESULTS_BUILD_I ON PUBLIC.DUPLICATE_RESULTS(BUILD_ID)
CREATE CACHED TABLE PUBLIC.DUPLICATE_DIFF(BUILD_ID BIGINT NOT NULL,HASH BIGINT NOT NULL,CONSTRAINT DUPLICATE_DIFF_PK PRIMARY KEY(BUILD_ID,HASH))
CREATE CACHED TABLE PUBLIC.DUPLICATE_FRAGMENTS(ID BIGINT NOT NULL,FILE_ID BIGINT NOT NULL,LINE INTEGER NOT NULL,OFFSET_INFO VARCHAR(100) NOT NULL,CONSTRAINT DUPLICATE_FRAGMENTS_PK PRIMARY KEY(ID,FILE_ID,LINE,OFFSET_INFO))
CREATE INDEX DUPLICATE_FRAGMENTS_FILE_I ON PUBLIC.DUPLICATE_FRAGMENTS(FILE_ID)
CREATE CACHED TABLE PUBLIC.DUPLICATE_STATS(BUILD_ID BIGINT NOT NULL,TOTAL INTEGER,NEW_TOTAL INTEGER,OLD_TOTAL INTEGER,CONSTRAINT DUPLICATE_STATS_PK PRIMARY KEY(BUILD_ID))
CREATE CACHED TABLE PUBLIC.STATS_PUBLISHER_STATE(METRIC_ID BIGINT NOT NULL,VALUE BIGINT NOT NULL,CONSTRAINT STATS_PUBLISHER_STATE_PK PRIMARY KEY(METRIC_ID))
CREATE CACHED TABLE PUBLIC.COMMENTS(ID BIGINT NOT NULL,AUTHOR_ID BIGINT,WHEN_CHANGED BIGINT NOT NULL,COMMENTARY VARCHAR(4096),CONSTRAINT COMMENTS_PK PRIMARY KEY(ID))
CREATE INDEX COMMENTS_WHEN_CHANGED_I ON PUBLIC.COMMENTS(WHEN_CHANGED)
CREATE CACHED TABLE PUBLIC.ACTION_HISTORY(OBJECT_ID VARCHAR(80),COMMENT_ID BIGINT,ACTION INTEGER,ADDITIONAL_DATA VARCHAR(80))
CREATE INDEX ACTION_HISTORY_COMMENT ON PUBLIC.ACTION_HISTORY(COMMENT_ID)
CREATE INDEX ACTION_HISTORY_OBJECT ON PUBLIC.ACTION_HISTORY(OBJECT_ID)
CREATE INDEX ACTION_HISTORY_ACTION_OBJECT_I ON PUBLIC.ACTION_HISTORY(ACTION,OBJECT_ID)
CREATE CACHED TABLE PUBLIC.AUDIT_ADDITIONAL_OBJECT(COMMENT_ID BIGINT,OBJECT_INDEX INTEGER,OBJECT_ID VARCHAR(80),OBJECT_NAME VARCHAR(2500))
CREATE INDEX AUDIT_A_O_COMMENT ON PUBLIC.AUDIT_ADDITIONAL_OBJECT(COMMENT_ID)
CREATE CACHED TABLE PUBLIC.BUILD_SET_TMP(BUILD_ID BIGINT NOT NULL,CONSTRAINT BUILD_SET_PK PRIMARY KEY(BUILD_ID))
CREATE CACHED TABLE PUBLIC.CLEAN_CHECKOUT_ENFORCEMENT(BUILD_TYPE_ID VARCHAR(80) NOT NULL,AGENT_ID INTEGER NOT NULL,CURRENT_BUILD_ID BIGINT NOT NULL,REQUEST_TIME TIMESTAMP NOT NULL,CONSTRAINT CLEAN_CHECKOUT_ENFORCEMENT_PK PRIMARY KEY(BUILD_TYPE_ID,AGENT_ID))
CREATE CACHED TABLE PUBLIC.SERVER_STATISTICS(METRIC_KEY BIGINT NOT NULL,METRIC_VALUE BIGINT NOT NULL,METRIC_TIMESTAMP BIGINT NOT NULL)
CREATE INDEX METRIC_KEY_INDEX ON PUBLIC.SERVER_STATISTICS(METRIC_KEY,METRIC_TIMESTAMP)
CREATE CACHED TABLE PUBLIC.NODE_EVENTS(ID BIGINT NOT NULL,NAME VARCHAR(64),LONG_ARG1 BIGINT,LONG_ARG2 BIGINT,STR_ARG VARCHAR(255),NODE_ID VARCHAR(80) NOT NULL,CREATED TIMESTAMP,CONSTRAINT NODE_EVENTS_PK PRIMARY KEY(NODE_ID,ID))
CREATE INDEX NODE_EVENTS_CREATED_IDX ON PUBLIC.NODE_EVENTS(CREATED)
CREATE CACHED TABLE PUBLIC.NODE_TASKS(ID INTEGER NOT NULL,TASK_TYPE VARCHAR(64) NOT NULL,TASK_IDENTITY VARCHAR(255) NOT NULL,LONG_ARG1 BIGINT,LONG_ARG2 BIGINT,STR_ARG VARCHAR(1024),NODE_ID VARCHAR(80) NOT NULL,EXECUTOR_NODE_ID VARCHAR(80),TASK_STATE INTEGER NOT NULL,CREATED TIMESTAMP,FINISHED TIMESTAMP,CONSTRAINT NODE_TASKS_PK PRIMARY KEY(ID),CONSTRAINT NODE_TASKS_TYPE_IDENT_AK UNIQUE(TASK_TYPE,TASK_IDENTITY,TASK_STATE))
CREATE INDEX NODE_TASKS_TASK_STATE_IDX ON PUBLIC.NODE_TASKS(TASK_STATE)
CREATE CACHED TABLE PUBLIC.CUSTOM_DATA_BODY(ID BIGINT NOT NULL,PART_NUM INTEGER NOT NULL,TOTAL_PARTS INTEGER NOT NULL,DATA_BODY VARCHAR(2000),UPDATE_DATE BIGINT NOT NULL,CONSTRAINT CUSTOM_DATA_BODY_IDX UNIQUE(ID,PART_NUM))
CREATE INDEX CUSTOM_DATA_BODY_UD_IDX ON PUBLIC.CUSTOM_DATA_BODY(UPDATE_DATE)
CREATE CACHED TABLE PUBLIC.CUSTOM_DATA(DATA_KEY_HASH VARCHAR(80) NOT NULL,COLLISION_IDX INTEGER NOT NULL,DATA_DOMAIN VARCHAR(80) NOT NULL,DATA_KEY VARCHAR(2000) NOT NULL,DATA_ID BIGINT NOT NULL,CONSTRAINT CUSTOM_DATA_KEY_HASH_IDX UNIQUE(DATA_KEY_HASH,COLLISION_IDX))
CREATE INDEX CUSTOM_DATA_DOMAIN_IDX ON PUBLIC.CUSTOM_DATA(DATA_DOMAIN)
CREATE INDEX CUSTOM_DATA_BODY_ID_IDX ON PUBLIC.CUSTOM_DATA(DATA_ID)
CREATE CACHED TABLE PUBLIC.SERVER_HEALTH_ITEMS(ID BIGINT NOT NULL,REPORT_ID VARCHAR(80) NOT NULL,CATEGORY_ID VARCHAR(80) NOT NULL,ITEM_ID VARCHAR(255) NOT NULL,CONSTRAINT SERVER_HEALTH_ITEMS_PK PRIMARY KEY(ID))
CREATE INDEX SERVER_HEALTH_ITEMS_IE ON PUBLIC.SERVER_HEALTH_ITEMS(REPORT_ID,CATEGORY_ID)
CREATE CACHED TABLE PUBLIC.HIDDEN_HEALTH_ITEM(ITEM_ID BIGINT NOT NULL,USER_ID BIGINT)
CREATE INDEX HEALTH_ITEM_ID_IE ON PUBLIC.HIDDEN_HEALTH_ITEM(ITEM_ID)
CREATE CACHED TABLE PUBLIC.VCS_CHANGES(MODIFICATION_ID BIGINT,CHANGE_NAME VARCHAR(64),CHANGE_TYPE INTEGER,BEFORE_REVISION VARCHAR(2048),AFTER_REVISION VARCHAR(2048),VCS_FILE_NAME VARCHAR(16000),RELATIVE_FILE_NAME VARCHAR(16000))
CREATE INDEX VCS_CHANGES_INDEX ON PUBLIC.VCS_CHANGES(MODIFICATION_ID)
CREATE CACHED TABLE PUBLIC.PERSONAL_VCS_CHANGES(MODIFICATION_ID BIGINT,CHANGE_NAME VARCHAR(64),CHANGE_TYPE INTEGER,BEFORE_REVISION VARCHAR(2048),AFTER_REVISION VARCHAR(2048),VCS_FILE_NAME VARCHAR(16000),RELATIVE_FILE_NAME VARCHAR(16000))
CREATE INDEX VCS_PERSONAL_CHANGES_INDEX ON PUBLIC.PERSONAL_VCS_CHANGES(MODIFICATION_ID)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.AGENT_POOL$(AGENT_POOL_ID INTEGER NOT NULL)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.AGENT_TYPE$(AGENT_TYPE_ID INTEGER NOT NULL)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.PROJECT$(INT_ID VARCHAR(80) NOT NULL)
CREATE INDEX SYS_IDX_T_11301 ON PUBLIC.PROJECT$(INT_ID)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.BUILD_TYPE$(BUILD_TYPE_ID VARCHAR(80) NOT NULL)
CREATE INDEX SYS_IDX_T_11304 ON PUBLIC.BUILD_TYPE$(BUILD_TYPE_ID)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.VCS_ROOT_INSTANCE$(ID INTEGER NOT NULL)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.MODIFICATION$(MODIFICATION_ID BIGINT NOT NULL)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.PROMOTION$(ID BIGINT NOT NULL)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.BUILD$(BUILD_ID BIGINT NOT NULL)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.TEST$(TEST_NAME_ID BIGINT NOT NULL)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.TEST_KEY$(TEST_NAME_ID BIGINT NOT NULL,CONSTRAINT TEST_KEY_PK PRIMARY KEY(TEST_NAME_ID))
CREATE GLOBAL TEMPORARY TABLE PUBLIC.PROBLEM$(PROBLEM_ID INTEGER NOT NULL)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.BRANCH$(BRANCH_NAME VARCHAR(255) NOT NULL)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.AUDIT_OBJECT_IDS_TO_CLEANUP$(OBJECT_ID VARCHAR(80) NOT NULL)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.AUDIT_COMMENT_IDS_TO_CLEANUP$(COMMENT_ID BIGINT NOT NULL)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.USER$(USER_ID BIGINT NOT NULL)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.CUSTOM_DATA_BODY_ID$(ID BIGINT NOT NULL)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.CUSTOM_DATA_DOMAIN$(DATA_DOMAIN VARCHAR(80) NOT NULL)
CREATE INDEX SYS_IDX_T_12035 ON PUBLIC.CUSTOM_DATA_DOMAIN$(DATA_DOMAIN)
CREATE GLOBAL TEMPORARY TABLE PUBLIC.DUPLICATE_FILE_NAME$(FILE_NAME VARCHAR(255) NOT NULL)
CREATE CACHED TABLE PUBLIC.SERVER(SERVER_ID BIGINT)
ALTER SEQUENCE SYSTEM_LOBS.LOB_ID RESTART WITH 1
SET DATABASE DEFAULT INITIAL SCHEMA PUBLIC
SET TABLE PUBLIC.DB_VERSION INDEX '5485 0 1'
SET TABLE PUBLIC.META_FILE_LINE INDEX '3081 0 1850'
SET TABLE PUBLIC.SINGLE_ROW INDEX '1 0 1'
SET TABLE PUBLIC.SERVER_PROPERTY INDEX '5564 0 2'
SET TABLE PUBLIC.DOMAIN_SEQUENCE INDEX '5728 0 1'
SET TABLE PUBLIC.PROJECT INDEX '5488 5488 0 0 2'
SET TABLE PUBLIC.BUILD_TYPE INDEX '5781 5781 0 0 1'
SET TABLE PUBLIC.VCS_ROOT INDEX '5491 5491 0 0 2'
SET TABLE PUBLIC.PROJECT_MAPPING INDEX '5494 5494 0 0 2'
SET TABLE PUBLIC.BUILD_TYPE_MAPPING INDEX '5784 5784 0 0 1'
SET TABLE PUBLIC.VCS_ROOT_MAPPING INDEX '5496 5496 0 0 2'
SET TABLE PUBLIC.AGENT_POOL INDEX '5499 0 1'
SET TABLE PUBLIC.USERGROUPS INDEX '5503 5503 0 0 1'
SET TABLE PUBLIC.USERS INDEX '5749 5749 0 0 1'
SET TABLE PUBLIC.USER_PROPERTY INDEX '5723 0 3'
SET TABLE PUBLIC.USERGROUP_NOTIFICATION_EVENTS INDEX '5535 5507 5535 0 0 0 6'
SET TABLE PUBLIC.USERGROUP_WATCH_TYPE INDEX '5539 5510 5539 0 0 0 6'
SET TABLE PUBLIC.USERGROUP_NOTIFICATION_DATA INDEX '5514 5514 0 0 2'
SET TABLE PUBLIC.VCS_ROOT_INSTANCE INDEX '5812 5812 0 0 1'
SET TABLE PUBLIC.AGENT_POOL_PROJECT INDEX '5501 0 2'
SET TABLE PUBLIC.VCS_ROOT_FIRST_REVISION INDEX '5830 0 1'
SET TABLE PUBLIC.VCS_USERNAME INDEX '5720 5720 5720 0 0 0 1'
SET TABLE PUBLIC.BUILD_QUEUE_ORDER INDEX '5567 0 1'
SET TABLE PUBLIC.USER_ROLES INDEX '5625 5625 0 0 2'
SET TABLE PUBLIC.USERGROUP_ROLES INDEX '5561 5561 0 0 1'
SET TABLE PUBLIC.STATS_PUBLISHER_STATE INDEX '5630 0 14'
SET TABLE PUBLIC.COMMENTS INDEX '5787 5787 0 0 7'
SET TABLE PUBLIC.ACTION_HISTORY INDEX '5790 5790 5790 5764 0 0 0 0 7'
SET TABLE PUBLIC.AUDIT_ADDITIONAL_OBJECT INDEX '5939 5947 0 0 3'
SET TABLE PUBLIC.SERVER_STATISTICS INDEX '5739 5741 0 0 3'
SET TABLE PUBLIC.NODE_TASKS INDEX '5676 5690 5710 0 0 0 18'
SET TABLE PUBLIC.CUSTOM_DATA_BODY INDEX '5914 5846 5914 0 0 0 9'
SET TABLE PUBLIC.CUSTOM_DATA INDEX '5841 5796 5857 5841 0 0 0 0 9'
SET TABLE PUBLIC.SERVER INDEX '5487 0 1'
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.SQL_IDENTIFIER TO PUBLIC
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.YES_OR_NO TO PUBLIC
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.TIME_STAMP TO PUBLIC
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CARDINAL_NUMBER TO PUBLIC
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CHARACTER_DATA TO PUBLIC
GRANT DBA TO SA
SET SCHEMA SYSTEM_LOBS
INSERT INTO BLOCKS VALUES(0,2147483647,0)