Upgrading to Team City 10 with Dockers

Answered

We have Team City 9 running in our own Docker we baked about  1 1/2 years ago and new we want to upgrade to Team City 10 using the Docker base as provided by Jet Brains.  What exactly would be the procedure to do this? We have tried rsyncing the data directory from TC 9 and copying the PostgreSQL database to a new instance and running the Docker over it, but it complains "it seems there is another Team City instance connected to the same database"

 

0
11 comments

Hello Matthew,

To perform the upgrade, you need to pull new version of the image and the server in it via the usual command and then start a container with correct paths to data directory and database, etc.

How did you copy the database? Did you stop TeamCity server before copying the database? Are you sure that you started new once? Could you please atttach teamcity-server.log file?

0

No, we didn't stop the TeamCity 9 server when copying the database.  That might be the problem.  I'm going to try that again.  In the meantime, here is the log.

0
--container="mesos-af4711c0-1117-43e6-805f-0bdc3d48b594-S0.4213069d-683f-4de0-8cf3-d87395ad6c56" --docker="docker" --docker_socket="/var/run/docker.sock" --help="false" --initialize_driver_logging="true" --launcher_dir="/usr/libexec/mesos" --logbufsecs="0" --logging_level="INFO" --mapped_directory="/mnt/mesos/sandbox" --quiet="false" --sandbox_directory="/tmp/mesos/slaves/af4711c0-1117-43e6-805f-0bdc3d48b594-S0/frameworks/af4711c0-1117-43e6-805f-0bdc3d48b594-0000/executors/intranet_teamcityserver10.682f3056-9082-11e6-8db4-0242dcbeed20/runs/4213069d-683f-4de0-8cf3-d87395ad6c56" --stop_timeout="1mins"
--container="mesos-af4711c0-1117-43e6-805f-0bdc3d48b594-S0.4213069d-683f-4de0-8cf3-d87395ad6c56" --docker="docker" --docker_socket="/var/run/docker.sock" --help="false" --initialize_driver_logging="true" --launcher_dir="/usr/libexec/mesos" --logbufsecs="0" --logging_level="INFO" --mapped_directory="/mnt/mesos/sandbox" --quiet="false" --sandbox_directory="/tmp/mesos/slaves/af4711c0-1117-43e6-805f-0bdc3d48b594-S0/frameworks/af4711c0-1117-43e6-805f-0bdc3d48b594-0000/executors/intranet_teamcityserver10.682f3056-9082-11e6-8db4-0242dcbeed20/runs/4213069d-683f-4de0-8cf3-d87395ad6c56" --stop_timeout="1mins"
Registered docker executor on 172.31.0.121
Starting task intranet_teamcityserver10.682f3056-9082-11e6-8db4-0242dcbeed20
Tomcat started.
-- tail -qf /opt/teamcity/logs/teamcity-server.log --
[2016-10-12 03:00:00,312] INFO - jetbrains.buildServer.CLEANUP - Clean-up took < 1s
[2016-10-12 03:00:00,318] INFO - jetbrains.buildServer.SERVER - Build history cache size is set to 10000 entries
[2016-10-12 03:00:00,318] INFO - jetbrains.buildServer.SERVER - Huge logs scanning finished
[2016-10-12 03:00:00,318] INFO - jetbrains.buildServer.SERVER - Skipping cleanup old Project Exports archives - directory doesn't exist
[2016-10-12 03:00:00,319] INFO - jetbrains.buildServer.CLEANUP - Lock for the maintenance process released
[2016-10-12 08:36:32,643] INFO - jetbrains.buildServer.CLEANUP - Searching for obsolete log files (not used by any build) under build logs directory: /data/teamcity_server/datadir/system/messages
[2016-10-12 08:36:32,643] INFO - jetbrains.buildServer.CLEANUP - Cannot find obsolete build log directories in old format
[2016-10-12 08:36:32,646] INFO - jetbrains.buildServer.CLEANUP - Searching for obsolete artifact directories (not used by any build) under directories: [/data/teamcity_server/datadir/system/artifacts]
[2016-10-12 09:05:37,351] INFO - l.UsageStatisticsCollectorImpl - Starting usage statistics collection...
[2016-10-12 09:06:43,419] INFO - l.UsageStatisticsCollectorImpl - Finish usage statistics collection, collected in 66067 ms
[2016-10-12 13:42:39,970] INFO - jetbrains.buildServer.STARTUP - Path to the startup configuration file: /opt/teamcity/bin/../conf/teamcity-startup.properties
[2016-10-12 13:42:40,088] INFO - jetbrains.buildServer.STARTUP -

 

 


[2016-10-12 13:42:40,094] INFO - jetbrains.buildServer.STARTUP - ===========================================================
[2016-10-12 13:42:40,099] INFO - jetbrains.buildServer.STARTUP - Starting TeamCity server
[2016-10-12 13:42:40,333] INFO - jetbrains.buildServer.STARTUP - TeamCity version: 10.0.2 (build 42234), data format version 787
[2016-10-12 13:42:40,343] INFO - jetbrains.buildServer.STARTUP - OS: Linux, User: root, Java: 1.8.0_91, Java HotSpot(TM) 64-Bit Server VM (25.91-b14, mixed mode), Java(TM) SE Runtime Environment (1.8.0_91-b14), Oracle Corporation
[2016-10-12 13:42:40,352] INFO - jetbrains.buildServer.STARTUP - JVM parameters: -Djava.util.logging.config.file=/opt/teamcity/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xmx2g -XX:MaxPermSize=270m -XX:ReservedCodeCacheSize=350m -Dteamcity.configuration.path=../conf/teamcity-startup.properties -Dlog4j.configuration=file:/opt/teamcity/bin/../conf/teamcity-server-log4j.xml -Dteamcity_logs=../logs/ -Djava.awt.headless=true -Djava.endorsed.dirs=/opt/teamcity/endorsed -Dcatalina.base=/opt/teamcity -Dcatalina.home=/opt/teamcity -Djava.io.tmpdir=/opt/teamcity/temp
[2016-10-12 13:42:40,357] INFO - jetbrains.buildServer.STARTUP - Garbage collection: PS Scavenge, PS MarkSweep
[2016-10-12 13:42:40,374] INFO - jetbrains.buildServer.STARTUP - Web server version: Apache Tomcat/7.0.68
[2016-10-12 13:42:40,378] INFO - jetbrains.buildServer.STARTUP - Server IP address: 172.17.0.4
[2016-10-12 13:42:40,385] INFO - jetbrains.buildServer.STARTUP - Web server ports: 8111 (protocol: org.apache.coyote.http11.Http11NioProtocol, scheme: http), 8105 (shutdown port)
[2016-10-12 13:42:40,390] INFO - jetbrains.buildServer.STARTUP - TeamCity server work mode: Main TeamCity Server
[2016-10-12 13:42:40,397] INFO - jetbrains.buildServer.STARTUP - Version file lock was successfully obtained: /opt/teamcity/webapps/ROOT/BUILD_42234
[2016-10-12 13:42:40,411] INFO - jetbrains.buildServer.STARTUP - Servlet real path: /opt/teamcity/webapps/ROOT/
[2016-10-12 13:42:40,420] INFO - jetbrains.buildServer.STARTUP - Current stage: Looking for the TeamCity Data Directory
[2016-10-12 13:42:40,425] INFO - jetbrains.buildServer.STARTUP - The TeamCity Data Directory path is determined using the environment variable TEAMCITY_DATA_PATH
[2016-10-12 13:42:40,440] INFO - jetbrains.buildServer.STARTUP - The TeamCity Data Directory "/data/teamcity_server/datadir" exists
[2016-10-12 13:42:40,449] INFO - jetbrains.buildServer.STARTUP - The main configuration file "/data/teamcity_server/datadir/config/main-config.xml" exists
[2016-10-12 13:42:40,454] INFO - jetbrains.buildServer.STARTUP - The database properties file "/data/teamcity_server/datadir/config/database.properties" exists
[2016-10-12 13:42:40,461] INFO - jetbrains.buildServer.STARTUP - The internal database data file "/data/teamcity_server/datadir/system/buildserver.data" doesn't exist
[2016-10-12 13:42:40,475] INFO - jetbrains.buildServer.STARTUP - Data Directory version: 787
[2016-10-12 13:42:40,482] INFO - jetbrains.buildServer.STARTUP - Current stage: Looking for the database configuration
[2016-10-12 13:42:40,486] INFO - jetbrains.buildServer.STARTUP - Database properties file "/data/teamcity_server/datadir/config/database.properties" exists
[2016-10-12 13:42:40,491] INFO - jetbrains.buildServer.STARTUP - Internal HSQL database file (/data/teamcity_server/datadir/system/buildserver.data) doesn't exist
[2016-10-12 13:42:40,495] INFO - jetbrains.buildServer.STARTUP - Database connection URL: jdbc:postgresql://utils.cszd5qhn9cby.us-west-2.rds.amazonaws.com:5432/teamcity10
[2016-10-12 13:42:40,501] INFO - jetbrains.buildServer.STARTUP - Using database connection URL from the database properties file. The URL is: jdbc:postgresql://utils.cszd5qhn9cby.us-west-2.rds.amazonaws.com:5432/teamcity10
[2016-10-12 13:42:40,506] INFO - jetbrains.buildServer.STARTUP - Using external (POSTGRESQL) database
[2016-10-12 13:42:40,511] INFO - jetbrains.buildServer.STARTUP - Current stage: Connecting to the database
[2016-10-12 13:42:40,524] INFO - jetbrains.buildServer.STARTUP - JDBC loader: loading JDBC drivers (for the first time)
[2016-10-12 13:42:40,837] INFO - ide.db.TeamCityDatabaseManager - Database character set: UTF8
[2016-10-12 13:42:40,842] INFO - ide.db.TeamCityDatabaseManager - Database collation: en_US.UTF-8
[2016-10-12 13:42:40,871] INFO - jetbrains.buildServer.STARTUP - JDBC driver version: 9.3 (PostgreSQL Native Driver)
[2016-10-12 13:42:40,875] INFO - jetbrains.buildServer.STARTUP - Database system version: 9.4.5 (PostgreSQL)
[2016-10-12 13:42:40,912] INFO - jetbrains.buildServer.STARTUP - Connected to the database successfully
[2016-10-12 13:42:40,916] INFO - jetbrains.buildServer.STARTUP - Current stage: Checking the database
[2016-10-12 13:42:41,051] INFO - jetbrains.buildServer.STARTUP - Using schema: public
[2016-10-12 13:42:41,061] INFO - jetbrains.buildServer.STARTUP - Schema contains 123 tables.
[2016-10-12 13:42:41,070] INFO - jetbrains.buildServer.STARTUP - Database version is 787
[2016-10-12 13:42:41,103] INFO - etbrains.buildServer.HEARTBEAT - Attempting to capture the DB lock. My session starting code: 1442861622
[2016-10-12 13:42:41,154] INFO - etbrains.buildServer.HEARTBEAT - Revealed a concurrent competitor: Session 397048116 with node id MAIN_SERVER started at 2016-10-11 08:36:19.093 in mode WORK from (172.17.0.9, aafbd35e-b2ee-47d6-b486-9694bd149eec, main_server, http://mesos-lb-1.reelmetrics:10036, IP: 172.17.0.9, Port: 8111, Installation Directory: /opt/teamcity, Data Directory: /data/teamcity_server/datadir, version 10.0.2, build 42234) last updated at 2016-10-12 13:42:24.899367.
[2016-10-12 13:42:42,170] INFO - etbrains.buildServer.HEARTBEAT - Our session record has been deleted by Session 397048116 with node id MAIN_SERVER started at 2016-10-11 08:36:19.093 in mode WORK from (172.17.0.9, aafbd35e-b2ee-47d6-b486-9694bd149eec, main_server, http://mesos-lb-1.reelmetrics:10036, IP: 172.17.0.9, Port: 8111, Installation Directory: /opt/teamcity, Data Directory: /data/teamcity_server/datadir, version 10.0.2, build 42234) last updated at 2016-10-12 13:42:24.899367.
EAT - Removed the concurrent sessions 1442861622 (in impudent mode)
[2016-10-12 13:42:42,179] WARN - ide.db.TeamCityDatabaseManager - Another TeamCity server is working with this database: Session 397048116 with node id MAIN_SERVER started at 2016-10-11 08:36:19.093 in mode WORK from (172.17.0.9, aafbd35e-b2ee-47d6-b486-9694bd149eec, main_server, http://mesos-lb-1.reelmetrics:10036, IP: 172.17.0.9, Port: 8111, Installation Directory: /opt/teamcity, Data Directory: /data/teamcity_server/datadir, version 10.0.2, build 42234) last updated at 2016-10-12 13:42:24.899367.
[2016-10-12 13:42:42,194] INFO - jetbrains.buildServer.STARTUP - The database lock can't be taken, database is used by another server: Session 397048116 with node id MAIN_SERVER started at 2016-10-11 08:36:19.093 in mode WORK from (172.17.0.9, aafbd35e-b2ee-47d6-b486-9694bd149eec, main_server, http://mesos-lb-1.reelmetrics:10036, IP: 172.17.0.9, Port: 8111, Installation Directory: /opt/teamcity, Data Directory: /data/teamcity_server/datadir, version 10.0.2, build 42234) last updated at 2016-10-12 13:42:24.899367.
[2016-10-12 13:42:42,199] INFO - jetbrains.buildServer.STARTUP - Current stage: Second TeamCity instance detected (administrator login is required to proceed)
[2016-10-12 13:42:42,204] INFO - jetbrains.buildServer.STARTUP - Administrator can login from web UI using authentication token: 8419626872321041099
[2016-10-12 13:42:52,591] INFO - jetbrains.buildServer.STARTUP - Server shutdown event received
[2016-10-12 13:42:52,591] INFO - jetbrains.buildServer.STARTUP - Current stage: TeamCity server is shutting down
[2016-10-12 13:42:52,592] INFO - jetbrains.buildServer.STARTUP - Stopping the main application
[2016-10-12 13:42:52,692] INFO - jetbrains.buildServer.STARTUP - Destroying the main servlet
[2016-10-12 13:42:52,693] INFO - MainTeamCityApplicationContext - Closing WebApplicationContext for namespace 'buildServer-servlet': startup date [Tue Oct 11 08:36:27 UTC 2016]; parent: jetbrains.buildServer.maintenance.WebDispatcherApplicationContext@357bc8b
[2016-10-12 13:42:52,696] INFO - til.ChildSpringContextLoader$1 - Closing jetbrains.buildServer.util.ChildSpringContextLoader$1@427f99ee: startup date [Tue Oct 11 08:36:36 UTC 2016]; parent: WebApplicationContext for namespace 'buildServer-servlet'
[2016-10-12 13:42:52,771] INFO - tbrains.buildServer.ACTIVITIES - Shutdown Spring components
[2016-10-12 13:42:52,772] INFO - jetbrains.buildServer.SERVER - Start shutdown of the thread "Ping 1"
[2016-10-12 13:42:52,772] INFO - jetbrains.buildServer.SERVER - Start shutdown of the thread "Flush Queue 1"
[2016-10-12 13:42:52,772] INFO - jetbrains.buildServer.SERVER - Start shutdown of the thread "Vcs Monitor 1"
[2016-10-12 13:42:52,772] INFO - jetbrains.buildServer.SERVER - Start shutdown of the thread "Build Triggers Monitor 1"
[2016-10-12 13:42:52,781] INFO - ojects.BackgroundPersisterImpl - Shutdown background persister
[2016-10-12 13:42:52,781] INFO - ojects.BackgroundPersisterImpl - Background persister shutdown complete
[2016-10-12 13:42:52,808] INFO - .index.BuildIndexer (metadata) - Background build indexer finished
[2016-10-12 13:42:52,973] INFO - ld.index.BuildIndexer (search) - Background build indexer finished
[2016-10-12 13:42:53,314] INFO - rShutdownProcessTerminatorImpl - Start killing all child processes. To disable it set 'teamcity.kill.child.processes.on.shutdown' JVM property to 'false'
[2016-10-12 13:42:53,315] INFO - rocesses.ProcessTreeTerminator - Using jetbrains.buildServer.processes.ProcessTreeTerminatorLinux
[2016-10-12 13:42:53,316] INFO - .ProcessTreeTerminatorImplBase - Will use command 'sh -c echo $$ && ps awwxo pid,ppid,command | tee'.
[2016-10-12 13:42:53,344] INFO - .ProcessTreeTerminatorImplBase - Will use command 'sh -c echo $$ && ps awwxo pid,ppid,command | tee'.
[2016-10-12 13:42:53,367] INFO - ses.ProcessTreeTerminatorLinux - Second thread id is 19
[2016-10-12 13:42:53,367] INFO - ses.ProcessTreeTerminatorLinux - Thread is Process thread model: false
[2016-10-12 13:42:53,367] INFO - .ProcessTreeTerminatorImplBase - Collecting processes from the current one, current process PID 19
[2016-10-12 13:42:53,368] INFO - .ProcessTreeTerminatorImplBase - No processes to kill
[2016-10-12 13:42:53,369] INFO - tbrains.buildServer.ACTIVITIES - Spring components are shut down
[2016-10-12 13:42:53,369] INFO - jetbrains.buildServer.STARTUP - The main servlet destroyed
[2016-10-12 13:42:53,371] INFO - etbrains.buildServer.HEARTBEAT - Stopping Heartbeat thread
[2016-10-12 13:42:53,376] INFO - etbrains.buildServer.HEARTBEAT - The lock is released
[2016-10-12 13:42:53,384] INFO - jetbrains.buildServer.STARTUP - Version file lock was released: /opt/teamcity/webapps/ROOT/BUILD_42234
[2016-10-12 13:42:53,384] INFO - jetbrains.buildServer.STARTUP - Server shutdown complete
0

Alina,

I deleted from the db_heartbeat, then Team City 10 server starts, but then the next problem is when it tries to upgrade the data/database:

java.lang.IllegalArgumentException: Wrong definition: " username: teamcity10_username M defines".
at jetbrains.buildServer.serverSide.db.schema.SchemaDefBuilder.buildTableDef(SchemaDefBuilder.java:239)
at jetbrains.buildServer.serverSide.db.schema.SchemaDefBuilder.buildSchemaDef(SchemaDefBuilder.java:74)
at jetbrains.buildServer.serverSide.db.metadata.MetadataUtil.loadSchemaFromDatabase(MetadataUtil.java:139)
at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.getTablesToBackup(BackupProcessor.java:408)
at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.access$800(BackupProcessor.java:50)
at jetbrains.buildServer.serverSide.maintenance.BackupProcessor$1.run(BackupProcessor.java:256)
at jetbrains.buildServer.serverSide.maintenance.BackupProcessor$1.run(BackupProcessor.java:217)
at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.withDB(TeamCityDatabaseManager.java:870)
at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.performBackup(BackupProcessor.java:217)
at jetbrains.buildServer.serverSide.maintenance.BackupProcessor.runProcess(BackupProcessor.java:180)
at jetbrains.buildServer.serverSide.maintenance.AbstractMaintenanceProcess$1.run(AbstractMaintenanceProcess.java:158)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:74)
at jetbrains.buildServer.serverSide.maintenance.AbstractMaintenanceProcess.run(AbstractMaintenanceProcess.java:155)
at jetbrains.buildServer.serverSide.maintenance.MaintenanceProcessManagerImpl$ProcessProxy.run(MaintenanceProcessManagerImpl.java:153)
at java.lang.Thread.run(Thread.java:745)

0

Please do not try to patch database manually, this really can cause more troubles. Server clears states in log that there is another TeamCity server running and using the same database. You should stop this server first, then proceed with upgrade. 

Also please attach results of this SQL query:

select line_text from meta_file_line where file_name = 'schema.config' order by line_nr
0

-- TEAMCITY DATABASE SCHEMA


-- Each table describes as a table name started from the first position of the line,
-- and followed by its inner constructions with offset. All inner constructions
-- should be written with the same offset.

 

-- ABBREVIATIONS
-- -------------
-- M: mandatory (not null)
-- PK: primary key
-- AK: alternative key (unique index)
-- IE: inversion entry (non-unique index)


-- DATA TYPES
-- ----------
-- int : 4-bytes signed integer
-- long_int : 8-bytes signed integer
-- decimal(p,s) : decimal number, p for precision, s for scale
-- char : one character
-- str(n) : string of length n, n is limited to 2000
-- long_str(n) : long text of length n (CLOB)
-- uni_str(n) : unicode string of length n, n is limited to 1000
-- long_uni_str(n) : long unicode text of length n (NCLOB)
-- timestamp : date and time with 1 second precision, without time zone
-- boolean : boolean


-- FIELD OPTIONS
-- -------------
-- default <value> : specifies default value
-- defines : defines value of it's domain
-- refers : references to domain values defines in other tables
-- serial : means that this field gets it values from a sequence


-- Notes:
-- 1. The first table should be the 'db_version', the last table should be the 'server'.
-- 2. Tables are grouped by categories. Please put new one into a proper category.
-- 3. All names should be written in lower case; national characters are not allowed.
-- 4. Names of temporary tables are suffixed with '$'.
-- 5. Ensure that there are no tab characters at beginning of lines.
-- 6. Unicode string and text types are used since 9.0.
-- 7. BLOBs (strings more than 4000 or unicode strings more than 2000) must be the last fields.
-- 8. In this file allows at most 160 character per line.

 

-- DOMAINS

config_id: domain of str(80)
group_id: domain of str(16)
teamcity10_username: domain of str(60)
user_id: domain of long_int
user_role_id: domain of str(80)
user_notific_rule_id: domain of long_int
group_notific_rule_id: domain of long_int
subject_property_key: domain of str(80)
agent_pool_id: domain of int
agent_id: domain of int
agent_type_id: domain of int
project_ext_id: domain of str(80)
bt_ext_id: domain of str(80)
vcs_root_ext_id: domain of str(80)
project_int_id: domain of str(80)
bt_int_id: domain of str(80) -- for both build_type and build_template
vcs_root_int_id: domain of int
vcs_root_instance_id: domain of int
vcs_revision: domain of str(200)
modification_hash: domain of str(40)
modification_id: domain of long_int
personal_modification_id: domain of long_int
promotion_id: domain of long_int
build_id: domain of long_int
test_name_hash: domain of long_int
problem_id: domain of int
problem_type: domain of str(80)
problem_identity: domain of str(60)
mute_id: domain of int
file_name_hash: domain of str(40)
tag_phrase: domain of uni_str(255)
metric_hash: domain of long_int
server_health_item_id: domain of long_int
audit_comment_id: domain of long_int
cleanup_proc_id: domain of long_int
inspection_id_hash: domain of long_int
inspection_id_str: domain of str(255)
inspection_data_hash: domain of long_int
duplicate_file_id: domain of long_int
duplicate_file_name: domain of str(255)
duplicate_result_id: domain of long_int
duplicate_result_hash: domain of int

 

 

-- TABLES THAT CONTAIN PREDEFINED IMMUTABLE DATA

db_version: table

version_number: int M
version_time: timestamp M

db_version_pk: PK (version_number)


meta_file_line: table

file_name: str(15) M -- metadata file name with suffix
line_nr: int M -- line number, started with 1
line_text: str(160) -- text of line

meta_file_line_pk: PK (file_name, line_nr)


single_row: table

dummy_field: char


server_property: table

prop_name: str(80) M
prop_value: str(256) M

server_property_pk: PK (prop_name)

 


-- GLOBAL TABLES (NOT RELATED TO PROJECTS OR USERS OR AGENTS)


db_heartbeat: table

starting_code: long_int M
starting_time: timestamp M
lock_mode: char M
ip_address: str(15)
additional_info: str(80)
last_time: timestamp M

db_heartbeat_pk: PK (starting_code)


backup_info: table

mproc_id: int M
file_name: str(1000)
file_size: long_int
started: timestamp M
finished: timestamp
status: char

backup_info_pk: PK (mproc_id)

backup_info_file_i: IE (file_name)


backup_builds: table

build_id: build_id M

backup_builds_pk: PK (build_id)


cleanup_history: table

proc_id: cleanup_proc_id M serial defines
start_time: long_int M
finish_time: long_int
interrupt_reason: str(20)

cleanup_history_pk: PK (proc_id)


server_health_items: table

id: server_health_item_id M serial defines
report_id: str(80) M
category_id: str(80) M
item_id: str(255) M
visible: boolean M

server_health_items_pk: PK (id)
server_health_items_ie: IE (report_id, category_id)

 


-- AGENT RELATED TABLES


agent_pool: table

agent_pool_id: agent_pool_id M serial defines -- 0 means the Default Pool
agent_pool_name: str(30) M defines -- see jetbrains.buildServer.serverSide.agentPools.AgentPoolConstants.MAX_POOL_NAME_LENGTH

agent_pool_pk: PK (agent_pool_id)
agent_pool_ak: AK (agent_pool_name)


agent_type: table

agent_type_id: agent_type_id M serial defines
agent_pool_id: agent_pool_id M refers
cloud_code: str(6) M
profile_id: str(30) M
image_id: str(60) M
policy: int M -- 1: all configurations, 2: selected ones only

agent_type_pk: PK (agent_type_id)
agent_type_ak: AK (cloud_code, profile_id, image_id)
agent_type_pool_i: IE (agent_pool_id)


agent_type_info: table

agent_type_id: agent_type_id M refers
os_name: str(60) M
cpu_rank: int
created_timestamp: timestamp
modified_timestamp: timestamp

agent_type_info_pk: PK (agent_type_id)


agent_type_runner: table

agent_type_id: agent_type_id M refers
runner: str(250) M

agent_type_runner_pk: PK (agent_type_id, runner)


agent_type_vcs: table

agent_type_id: agent_type_id M refers
vcs: str(250) M

agent_type_vcs_pk: PK (agent_type_id, vcs)


agent_type_param: table

agent_type_id: agent_type_id M refers
param_kind: char M
param_name: str(160) M
param_value: uni_str(2000)

agent_type_param_pk: PK (agent_type_id, param_kind, param_name)


agent: table

id: agent_id M serial defines
name: str(80) M defines
host_addr: str(80) M
port: int M
agent_type_id: int M
status: int
authorized: int
registered: int
registration_timestamp: long_int
last_binding_timestamp: long_int
unregistered_reason: str(256)
authorization_token: str(32)
status_to_restore: int
status_restoring_timestamp: long_int

agent_pk: PK (id)
agent_name_ui: AK (name)

agent_host_address: IE (host_addr)
agent_authorization_token: IE (authorization_token)
agent_agent_type_id: IE (agent_type_id)


cloud_started_instance: table

profile_id: str(30) M
cloud_code: str(6) M
image_id: str(80) M
instance_id: str(80) M
last_update: timestamp M

cloud_started_instance_pk: PK (profile_id, cloud_code, image_id, instance_id)


cloud_image_without_agent: table

profile_id: str(30) M
cloud_code: str(6) M
image_id: str(80) M
last_update: timestamp M

cloud_image_without_agent_pk: PK (profile_id, cloud_code, image_id)

 


-- USERS DEFINITION TABLES


usergroups: dictionary table

group_id: group_id M defines
name: uni_str(255) M defines
description: uni_str(2000)

usergroups_pk: PK (group_id) stable
usergroups_ak: AK (name)


usergroup_property: table

group_id: group_id M refers
prop_key: subject_property_key M defines
prop_value: uni_str(2000)

usergroup_property_pk: PK (group_id, prop_key)


users: dictionary table

id: user_id M serial defines -- user's surrogate id
username: teamcity10_username M defines -- user's natural id, in lower case
password: str(128) -- enciphered password
name: uni_str(256) -- user's real name
email: str(256)
last_login_timestamp: long_int

users_pk: PK (id)
users_ak: AK (username) stable


user_property: table

user_id: user_id M refers
prop_key: subject_property_key M defines
prop_value: uni_str(2000)

user_property_pk: PK (user_id, prop_key)


user_blocks: table

user_id: user_id M refers
block_type: str(80) M
state: str(2048)

user_blocks_pk: PK (user_id, block_type)


user_notification_events: table

id: user_notific_rule_id M serial defines
user_id: user_id M refers
notificator_type: str(20) M
events_mask: int M

user_notification_events_pk: PK (id)

notification_events_notifier: IE (notificator_type)
notification_events_user_id: IE (user_id)


user_watch_type: table

rule_id: user_notific_rule_id M refers
user_id: user_id M refers
notificator_type: str(20) M
watch_type: int M -- values 1..5; 2 - project, 3 - build type, other - unknown
watch_value: str(80) M
order_num: long_int

user_watch_type_pk: PK (user_id, notificator_type, watch_type, watch_value)
watch_type_rule_id: IE (rule_id)


user_notification_data: table
user_id: user_id M refers
rule_id: user_notific_rule_id M refers
additional_data: str(2000)

user_notif_data_pk: PK (user_id, rule_id)
user_notif_data_rule_id: IE (rule_id)


usergroup_subgroups: table

hostgroup_id: group_id M
subgroup_id: group_id M

usergroup_subgroups_pk: PK (hostgroup_id, subgroup_id)


usergroup_users: table

group_id: group_id M refers
user_id: user_id M refers

usergroup_users_pk: PK (group_id, user_id)


usergroup_notification_events: table

id: group_notific_rule_id M serial defines
group_id: group_id M refers
notificator_type: str(20) M
events_mask: int M

usergroup_notific_evnts_pk: PK (id)

usergroup_events_notifier: IE (notificator_type)
usergroup_events_group_id: IE (group_id)


usergroup_watch_type: table

rule_id: group_notific_rule_id M refers
group_id: group_id M refers
notificator_type: str(20) M
watch_type: int M -- values 1..5; 2 - project, 3 - build type, other - unknown
watch_value: str(80) M
order_num: long_int

usergroup_watch_type_pk: PK (group_id, notificator_type, watch_type, watch_value)
group_watch_type_rule_id: IE (rule_id)


usergroup_notification_data: table

group_id: group_id M refers
rule_id: group_notific_rule_id M refers
additional_data: str(2000)

group_notif_data_pk: PK (group_id, rule_id)
group_notif_data_rule_id: IE (rule_id)


remember_me: table

user_key: str(65) M
secure: long_int M

 


-- COMMON DICTIONARY TABLES


long_file_name: dictionary table

hash: file_name_hash M defines
file_name: long_uni_str(16000) M defines

long_file_name_pk: PK (hash) stable


test_names: dictionary table

id: test_name_hash M defines
test_name: uni_str(255) M defines

test_names_pk: PK (id) stable


data_storage_dict: dictionary table

metric_id: metric_hash M defines
value_type_key: str(200) defines

metric_id_pk: PK (metric_id) stable
value_type_key_index: AK (value_type_key) stable


problem: dictionary table

problem_id: problem_id M serial defines
problem_type: problem_type M
problem_identity: problem_identity M

problem_pk: PK (problem_id)
problem_ak: AK (problem_type, problem_identity) stable

 


-- PROJECTS AND BUILD HISTORY TABLES


project: dictionary table

int_id: project_int_id M serial defines
config_id: config_id M defines

project_pk: PK (int_id)
project_ak: AK (config_id) stable


build_type: dictionary table

int_id: bt_int_id M serial defines
config_id: config_id M defines

build_type_pk: PK (int_id)
build_type_ak: AK (config_id) stable


vcs_root: dictionary table

int_id: vcs_root_int_id M serial defines
config_id: config_id M defines

vcs_root_pk: PK (int_id)
vcs_root_ak: AK (config_id) stable


project_mapping: table

int_id: project_int_id M refers
ext_id: project_ext_id M defines
main: boolean M

project_mapping_pk: PK (int_id, ext_id)
project_mapping_ak: AK (ext_id)


build_type_mapping: table

int_id: bt_int_id M refers
ext_id: bt_ext_id M defines
main: boolean M

build_type_mapping_pk: PK (int_id, ext_id)
build_type_mapping_ak: AK (ext_id)


vcs_root_mapping: table

int_id: vcs_root_int_id M defines -- refers TODO return refers when vcs_root table is populated
ext_id: vcs_root_ext_id M defines
main: boolean M

vcs_root_mapping_pk: PK (int_id, ext_id)
vcs_root_mapping_ak: AK (ext_id)


deleted_build_types: table

build_type_id: bt_int_id M refers
delete_time: long_int

deleted_build_types_pk: PK (build_type_id)


agent_type_bt_access: table

agent_type_id: agent_type_id M refers
build_type_id: bt_int_id M refers

agent_type_bt_access_pk: PK (agent_type_id, build_type_id)
agent_type_bt_access_bt_i: IE (build_type_id)


user_projects_visibility: table

user_id: user_id M refers
project_int_id: project_int_id M refers
visible: int M

user_projects_visibility_pk: PK (user_id, project_int_id)


user_projects_order: table

user_id: user_id M refers
project_int_id: project_int_id M refers
ordernum: int

user_projects_order_pk: PK (user_id, project_int_id)


vcs_root_instance: table

id: vcs_root_instance_id M serial defines
parent_id: vcs_root_int_id M refers
settings_hash: long_int M
body: long_str(16384)

vcs_root_instance_pk: PK (id)
vcs_root_instance_parent_idx: IE (parent_id)
vcs_root_instance_hash_idx: IE (settings_hash)


agent_pool_project: table

agent_pool_id: agent_pool_id M refers
project_int_id: project_int_id M refers

agent_pool_project_pk: PK (agent_pool_id, project_int_id)


agent_sources_version: table

build_type_id: bt_int_id M refers
vcs_root_id: vcs_root_instance_id M refers
agent_id: agent_id M refers
vcs_settings_hash: str(16) M
checkout_dir: str(2048)
current_version: str(80)

agent_sources_version_pk: PK (build_type_id, vcs_settings_hash, vcs_root_id, agent_id)
agent_sources_version_hidx: IE (vcs_settings_hash)


vcs_history: table

modification_id: modification_id M serial defines
user_name: uni_str(255)
description: uni_str(2000)
change_date: long_int
register_date: long_int
vcs_root_id: vcs_root_instance_id refers
changes_count: int
version: vcs_revision M
display_version: str(200)

vcs_history_pk: PK (modification_id)

vcs_history_root: IE (vcs_root_id)
vcs_history_user: IE (user_name)
vcs_version_in_root_i: IE (vcs_root_id, version)


vcs_change: table

modification_id: modification_id M refers
file_num: int M -- number of file in the change
vcs_file_name: uni_str(2000) M -- first 2000 characters if the name is long
vcs_file_name_hash: file_name_hash refers
relative_file_name_pos: int
relative_file_name: uni_str(2000)
relative_file_name_hash: file_name_hash refers
change_type: int M
change_name: str(64)
before_revision: vcs_revision
after_revision: vcs_revision

vcs_change_pk: PK (modification_id, file_num)


personal_vcs_history: table

modification_id: personal_modification_id M serial defines
modification_hash: modification_hash M defines
user_id: user_id M refers
description: uni_str(2000)
change_date: long_int M
changes_count: int M
commit_changes: int
status: int M default 0
scheduled_for_deletion: boolean M default 0

personal_vcs_history_pk: PK (modification_id)
personal_vcs_history_ak: AK (modification_hash) stable
personal_vcs_history_user_i: IE (user_id)


personal_vcs_change: table

modification_id: personal_modification_id M refers
file_num: int M -- number of file in the change
vcs_file_name: uni_str(2000) M -- first 2000 characters if the name is long
vcs_file_name_hash: file_name_hash refers
relative_file_name_pos: int
relative_file_name: uni_str(2000)
relative_file_name_hash: file_name_hash refers
change_type: int M
change_name: str(64)
before_revision: vcs_revision
after_revision: vcs_revision

personal_vcs_changes_pk: PK (modification_id, file_num)


vcs_changes_graph: table

child_modification_id: modification_id M refers
child_revision: vcs_revision M
parent_num: int M
parent_modification_id: modification_id refers
parent_revision: vcs_revision M

vcs_changes_graph_pk: PK (child_modification_id, parent_num)
vcs_changes_graph_parent_i: IE (parent_modification_id)


vcs_change_attrs: table

modification_id: modification_id M refers
attr_name: str(200) M
attr_value: str(1000)

vcs_change_attrs_pk: PK (modification_id, attr_name)


vcs_root_first_revision: table

build_type_id: bt_int_id M refers
parent_root_id: vcs_root_int_id M refers
settings_hash: long_int M
vcs_revision: vcs_revision M

vcs_root_first_revision_pk: PK (build_type_id, parent_root_id, settings_hash)


vcs_username: table

user_id: user_id M refers
vcs_name: str(60) M
parent_vcs_root_id: vcs_root_int_id M refers
order_num: int M
username: uni_str(255) M

vcs_username_pk: PK (user_id, vcs_name, parent_vcs_root_id, order_num)
vcs_username_ak: AK (user_id, vcs_name, parent_vcs_root_id, username)
vcs_username_user_ie: IE (vcs_name, parent_vcs_root_id, username)


build_state: table

id: promotion_id M serial defines
build_id: build_id defines
build_type_id: bt_int_id refers
modification_id: modification_id refers -- can be null if changes checking was not performed yet,
-- equals -1 if changes collecting is performed but there were no changes
-- detected and there were no changes in the build configuration since its creation
personal_modification_id: personal_modification_id -- reference to personal_vcs_history, or null for regular builds
personal_user_id: user_id -- owner of the modification
is_personal: boolean M default 0
is_canceled: boolean M default 0
is_changes_detached: boolean M default 0
is_deleted: boolean M default 0
branch_name: str(255) -- null means no branch (master)
queued_time: long_int
remove_from_queue_time: long_int

build_state_pk: PK (id)

build_state_build_i: IE (build_id)
build_state_mod_i: IE (modification_id)
build_state_build_type_i: IE (build_type_id)
build_state_puser_i: IE (personal_user_id)
build_state_pmod_i: IE (personal_modification_id)


running: table

build_id: build_id M serial defines
agent_id: agent_id refers
build_type_id: bt_int_id refers
build_start_time_agent: long_int
build_start_time_server: long_int
is_personal: int
build_number: str(256)
requestor: str(1024)
access_code: str(60)
queued_ag_restr_type_id: int -- agent restrictor type id
queued_ag_restr_id: int -- agent restrictor id
build_state_id: promotion_id refers
agent_type_id: agent_type_id refers

running_pk: PK (build_id)

running_state_id: IE (build_state_id)


history: table

build_id: build_id M serial defines
agent_name: str(80)
build_type_id: bt_int_id refers
build_start_time_server: long_int
build_start_time_agent: long_int
build_finish_time_server: long_int
status: int
status_text: uni_str(256)
user_status_text: uni_str(256)
pin: int
is_personal: int
is_canceled: int
build_number: str(256)
requestor: str(1024)
build_state_id: promotion_id refers
agent_type_id: agent_type_id

history_pk: PK (build_id)

start_time_index: IE (build_start_time_server)
build_type_id_index: IE (build_type_id)
pinned_index: IE (pin)
status_index: IE (status)
history_state_id: IE (build_state_id)
history_agname_bfintimesrv_i: IE (agent_name, build_finish_time_server)
history_finish_time_i: IE (build_finish_time_server)
history_build_number: IE (build_number)
history_agt_b_i: IE (agent_type_id, build_id)


light_history: table

build_id: build_id M serial defines
agent_name: str(80)
build_type_id: bt_int_id refers
build_start_time_server: long_int
build_start_time_agent: long_int
build_finish_time_server: long_int
status: int
status_text: uni_str(256)
user_status_text: uni_str(256)
pin: int
is_personal: int
is_canceled: int
build_number: str(256)
requestor: str(1024)
queued_time: long_int
remove_from_queue_time: long_int
build_state_id: long_int -- contains garbage, to drop
agent_type_id: agent_type_id
branch_name: str(255) -- null means no branch (master)

light_history_pk: PK (build_id)

start_time_index_light: IE (build_start_time_server)
build_type_id_index_light: IE (build_type_id)
pinned_index_light: IE (pin)
status_index_light: IE (status)
light_history_agname_bftime_i: IE (agent_name, build_finish_time_server)
light_history_finish_time_i: IE (build_finish_time_server)
light_history_agt_b_i: IE (agent_type_id, build_id)


build_project: table

build_id: build_id M refers
project_level: int M
project_int_id: project_int_id M refers

build_project_pk: PK (build_id, project_level)
build_project_project_idx: IE (project_int_id)


build_dependency: table

build_state_id: promotion_id M refers
depends_on: promotion_id M refers
dependency_options: int

build_dependency_pk: PK (build_state_id, depends_on)
build_dependency_ak: IE (depends_on, build_state_id)


build_attrs: table -- really it's promotion attrs

build_state_id: promotion_id M refers
attr_name: str(70) M
attr_value: uni_str(1000)
attr_num_value: long_int

build_attrs_pk: PK (build_state_id, attr_name)
build_attrs_num_i: IE (attr_num_value, attr_name, build_state_id)


build_data_storage: table

build_id: build_id M refers
metric_id: metric_hash M refers
metric_value: decimal(19,6) M

build_data_storage_pk: PK (build_id, metric_id)


canceled_info: table

build_id: build_id M refers
user_id: user_id refers
description: str(256)

canceled_info_pk: PK (build_id)


test_info: table

build_id: build_id M refers
test_id: int M
test_name_id: test_name_hash refers
status: int
duration: int M default 0

test_info_pk: PK (build_id, test_id)
test_name_id_idx: IE (test_name_id)


build_problem: table

build_state_id: promotion_id M refers
problem_id: problem_id M refers
problem_description: long_str(4000)

build_problem_pk: PK (build_state_id, problem_id)


build_problem_attribute: table

build_state_id: promotion_id M refers
problem_id: problem_id M refers
attr_name: str(60) M
attr_value: str(2000) M

build_problem_attribute_pk: PK (build_state_id, problem_id, attr_name)


build_artifact_dependency: table

build_state_id: promotion_id refers
source_build_type_id: bt_int_id refers
revision_rule: str(80)
branch: str(255)
src_paths: long_str(40960)

build_artif_dep_state_id: IE (build_state_id)


final_artifact_dependency: table

build_state_id: promotion_id refers
source_build_type_id: bt_int_id refers
revision_rule: str(80)
branch: str(255)
src_paths: long_str(40960)

final_artif_dep_state_id: IE (build_state_id)


build_type_vcs_change: table

modification_id: modification_id M refers
build_type_id: bt_int_id M refers
change_type: int

build_type_vcs_change_ui: AK (modification_id, build_type_id)
build_type_vcs_change_btid: IE (build_type_id)


build_checkout_rules: table

build_state_id: promotion_id M refers
build_type_id: bt_int_id M refers
vcs_root_id: vcs_root_instance_id M refers
checkout_rules: long_str(2096)

build_checkout_rules_pk: PK (build_state_id, build_type_id, vcs_root_id)


mute_info: table

-- invariant records (they're expected never been modified)
mute_id: mute_id M serial defines
muting_user_id: user_id M refers
muting_time: timestamp M
muting_comment: uni_str(2000)
scope: char M
project_int_id: project_int_id M refers
build_id: build_id refers
unmute_when_fixed: boolean
unmute_by_time: timestamp

mute_info_pk: PK (mute_id)
mute_info_ak: AK (project_int_id, mute_id)


mute_info_bt: table

-- build type was muted (a detail of the mute_info), not currently muted
mute_id: mute_id M refers
build_type_id: bt_int_id M refers

mute_info_bt_pk: PK (mute_id, build_type_id)


mute_info_test: table

-- test was muted (a detail of the mute_info), not currently muted
mute_id: mute_id M refers
test_name_id: test_name_hash M refers

mute_info_test_pk: PK (mute_id, test_name_id)


mute_test_in_proj: table

-- currently muted test in project
mute_id: mute_id M refers -- records can be reassigned from one muting to another
project_int_id: project_int_id M refers
test_name_id: test_name_hash M refers

mute_test_in_proj_pk: PK (mute_id, project_int_id, test_name_id)
mute_test_in_proj_ie: IE (project_int_id, test_name_id, mute_id)


mute_test_in_bt: table

-- currently muted test in build configuration
mute_id: mute_id M refers -- records can be reassigned from one muting to another
build_type_id: bt_int_id M refers
test_name_id: test_name_hash M refers

mute_test_in_bt_pk: PK (mute_id, build_type_id, test_name_id)
mute_test_in_bt_ie: IE (build_type_id, test_name_id, mute_id)


mute_info_problem: table

mute_id: mute_id M refers
problem_id: problem_id M refers

mute_info_problem_pk: PK (mute_id, problem_id)


mute_problem_in_proj: table

-- currently muted build problem in project
mute_id: mute_id M refers
project_int_id: project_int_id M refers
problem_id: problem_id M refers

mute_problem_in_proj_pk: PK (mute_id, project_int_id, problem_id)
mute_problem_in_proj_ie: IE (project_int_id, problem_id, mute_id)


mute_problem_in_bt: table

-- currently muted build problem in build configuration
mute_id: mute_id M refers
build_type_id: bt_int_id M refers
problem_id: problem_id M refers

mute_problem_in_bt_pk: PK (mute_id, build_type_id, problem_id)
mute_problem_in_bt_ie: IE (build_type_id, problem_id, mute_id)


build_problem_muted: table

build_state_id: promotion_id M refers
problem_id: problem_id M refers
mute_id: mute_id refers -- may be null if problem internally muted during the build

build_problem_muted_pk: PK (build_state_id, problem_id)


test_muted: table

build_id: build_id M refers
test_name_id: test_name_hash M refers
mute_id: mute_id M refers

test_muted_pk: PK (build_id, test_name_id, mute_id)
test_muted_mute_id: IE (mute_id)


test_failure_rate: table

build_type_id: bt_int_id M refers
agent_id: agent_id M refers
test_name_id: test_name_hash M refers
success_count: int
failure_count: int
last_failure_time: long_int

test_failure_rate_pk: PK (build_type_id, agent_id, test_name_id)


build_queue: table

build_type_id: bt_int_id refers
agent_restrictor_type_id: int
agent_restrictor_id: int
requestor: str(1024)
pos: int
build_state_id: promotion_id refers

build_queue_build_state_id: IE (build_state_id)


stats: table

build_id: build_id M refers
test_count: int
status_text: str(256)
-- a record per build

stats_pk: PK (build_id)


failed_tests_output: table

build_id: build_id M refers
test_id: int M
problem_description: long_str(256)
std_output: long_str(40960)
error_output: long_str(40960)
stacktrace: long_str(40960)
expected: long_str(40960)
actual: long_str(40960)

failed_tests_output_pk: PK (build_id, test_id)


compiler_output: table

build_id: build_id refers
message_order: int
message: long_str(40960)

co_build_id_index: IE (build_id)


ignored_tests: table

build_id: build_id refers
test_id: int
test_name: str(255)
reason: long_str(40960)

ignored_tests_build_id: IE (build_id)


downloaded_artifacts: table

target_build_id: build_id refers -- artifact was downloaded to
source_build_id: build_id refers -- artifact was downloaded from
download_timestamp: long_int
artifact_path: long_str(8192)

downloaded_artifacts_source_id: IE (source_build_id)
downloaded_artifacts_ts_id: IE (target_build_id,source_build_id)


build_revisions: table

build_state_id: promotion_id M refers
vcs_root_id: vcs_root_instance_id M refers
vcs_revision: vcs_revision M
vcs_revision_display_name: str(200)
vcs_branch_name: str(255)
modification_id: modification_id refers
vcs_root_type: int
checkout_mode: int -- null means the default checkout mode from a buildType, see BuildRevisionCheckoutMode

build_revisions_pk: PK (build_state_id, vcs_root_id)
build_revisions_vcs_root_i: IE (vcs_root_id)


default_build_parameters: table

build_state_id: promotion_id refers
param_name: str(2000)
param_value: long_uni_str(16000)

def_build_params_state_id: IE (build_state_id)


user_build_parameters: table

build_state_id: promotion_id refers
param_name: str(2000)
param_value: long_uni_str(16000)

user_build_params_state_id: IE (build_state_id)


build_labels: table

build_id: build_id M refers
vcs_root_id: vcs_root_instance_id M refers
label: str(80)
status: int default 0
error_message: str(256)

build_labels_pk: PK (build_id, vcs_root_id)
build_labels_vcs_root_i: IE (vcs_root_id)


personal_build_relative_path: table

build_id: build_id refers
original_path_hash: long_int
relative_path: long_str(16000)

personal_build_relative_p_ak: AK (build_id, original_path_hash)


responsibilities: table

problem_id: str(80) M -- it's not our problem_id, it's something else
state: int M
responsible_user_id: user_id M refers
reporter_user_id: user_id refers
timestmp: long_int
remove_method: int M default 0
comments: long_uni_str(4096)

responsibilities_pk: PK (problem_id)

responsibilities_reporter: IE (reporter_user_id)
responsibilities_assignee: IE (responsible_user_id)


build_state_tag: table

build_state_id: promotion_id M refers
tag: tag_phrase M

build_state_tag_pk: PK (build_state_id, tag)
build_state_tag_ie1: IE (tag, build_state_id)


build_state_private_tag: table

build_state_id: promotion_id M refers
owner: user_id M refers
tag: tag_phrase M

build_state_private_tag_pk: PK (build_state_id, owner, tag)
build_state_private_tag_ie1: IE (owner, build_state_id)


build_overriden_roots: table

build_state_id: promotion_id refers
original_vcs_root_id: vcs_root_instance_id M refers
substitution_vcs_root_id: vcs_root_instance_id M refers

build_overriden_roots_pk: PK (build_state_id, original_vcs_root_id)
build_subst_root_index: IE (substitution_vcs_root_id)


user_roles: table

user_id: user_id M refers
role_id: user_role_id M -- we need a dictionary of roles
project_int_id: project_int_id refers

user_roles_ui: AK (user_id, role_id, project_int_id)


usergroup_roles: table

group_id: group_id M refers
role_id: user_role_id M -- we need a dictionary of roles
project_int_id: project_int_id refers

usergroup_roles_ui: AK (group_id, role_id, project_int_id)

 

-- INSPECTIONS AND DUPLICATES

inspection_info: dictionary table

id: inspection_id_hash M defines
inspection_id: inspection_id_str defines
inspection_name: str(255)
inspection_desc: long_str(4000)
group_name: str(255)

inspection_info_pk: PK (id) stable
inspection_info_ak: AK (inspection_id) stable


inspection_data: dictionary table

hash: inspection_data_hash M defines
result: long_str(4000)
severity: int
type_pattern: int
fqname: long_str(4000)
file_name: str(255)
parent_fqnames: long_str(4000)
parent_type_patterns: str(20)
module_name: str(40)
inspection_id: inspection_id_hash refers
is_local: int
used: int M default 1

inspection_data_pk: PK (hash) stable

inspection_data_file_index: IE (file_name)
inspection_data_insp_index: IE (inspection_id)


inspection_fixes: table

hash: inspection_data_hash M refers
hint: str(255)

inspection_fixes_hash_index: IE (hash)


inspection_results: table

build_id: build_id M refers
hash: inspection_data_hash M refers
line: int M

inspection_results_hash_index: IE (hash)
inspection_results_buildhash_i: IE (build_id, hash)


inspection_stats: table

build_id: build_id M refers
total: int
new_total: int
old_total: int
errors: int
new_errors: int
old_errors: int

inspection_stats_pk: PK (build_id)


inspection_diff: table

build_id: build_id M refers
hash: inspection_data_hash M refers

inspection_diff_ak: AK (build_id, hash)

inspection_diff_hash_index: IE (hash)


project_files: dictionary table

file_id: duplicate_file_id M serial defines
file_name: duplicate_file_name M

project_files_pk: PK (file_id)
project_files_ak: AK (file_name) stable


duplicate_results: table

id: duplicate_result_id M serial defines
build_id: build_id M refers
hash: duplicate_result_hash M defines
cost: int

duplicate_results_pk: PK (id)
duplicate_results_build_i: IE (build_id)


duplicate_diff: table

build_id: build_id M refers
hash: long_int M

duplicate_diff_pk: PK (build_id, hash)


duplicate_fragments: table

id: duplicate_result_id M refers
file_id: duplicate_file_id M refers
line: int M
offset_info: str(100) M

duplicate_fragments_pk: PK (id, file_id, line, offset_info)
duplicate_fragments_file_i: IE (file_id)


fragments: table

build_type_id: bt_int_id M refers
file_id: duplicate_file_id M refers
hash: int M

fragments_pk: PK (build_type_id, file_id, hash)
fragments_file_i: IE (file_id)
fragments_hash_i: IE (hash)


duplicate_stats: table

build_id: build_id M refers
total: int
new_total: int
old_total: int

duplicate_stats_pk: PK (build_id)

 


-- OTHER TABLES

stats_publisher_state: table

metric_id: long_int M
value: long_int M

stats_publisher_state_pk: PK (metric_id)


comments: table

id: audit_comment_id M serial defines
author_id: user_id refers
when_changed: long_int M
commentary: long_uni_str(4096)

comments_pk: PK (id)


action_history: table

object_id: str(80)
comment_id: audit_comment_id refers
action: int
additional_data: str(80)

action_history_comment: IE (comment_id)
action_history_object: IE (object_id)
action_history_action_object_i: IE (action, object_id)


audit_additional_object: table

comment_id: audit_comment_id refers
object_index: int
object_id: str(80)
object_name: long_str(2500) -- is used only for deleted objects

audit_a_o_comment: IE (comment_id)
audit_a_o_object_index: IE (object_index)


build_set_tmp: table

build_id: build_id M

build_set_pk: PK (build_id)


clean_checkout_enforcement: table

build_type_id: bt_int_id M
agent_id: agent_id M
current_build_id: build_id M
request_time: timestamp M

clean_checkout_enforcement_pk: PK (build_type_id, agent_id)

 

-- DEPRECATED TABLES (will not be populated anymore)


vcs_changes: deprecated table

modification_id: modification_id
change_name: str(64)
change_type: int
before_revision: long_str(2048)
after_revision: long_str(2048)
vcs_file_name: long_str(16000)
relative_file_name: long_str(16000)

vcs_changes_index: IE (modification_id)


personal_vcs_changes: deprecated table

modification_id: modification_id
change_name: str(64)
change_type: int
before_revision: str(2048)
after_revision: str(2048)
vcs_file_name: long_str(16000)
relative_file_name: long_str(16000)

vcs_personal_changes_index: IE (modification_id)

 


-- TEMPORARY TABLES


agent_pool$: temporary table

agent_pool_id: agent_pool_id M


agent_type$: temporary table

agent_type_id: agent_type_id M


project$: temporary table

int_id: project_int_id M


build_type$: temporary table

build_type_id: bt_int_id M


vcs_root_instance$: temporary table

id: vcs_root_instance_id M


modification$: temporary table

modification_id: modification_id M


promotion$: temporary table

id: promotion_id M -- build_state_id in other tables


build$: temporary table

build_id: build_id M


test$: temporary table

test_name_id: test_name_hash M


test_key$: temporary table

test_name_id: test_name_hash M
test_key_pk: PK (test_name_id)


problem$: temporary table

problem_id: problem_id M


branch$: temporary table

branch_name: str(255) M


audit_object_ids_to_cleanup$: temporary table

object_id: str(80) M


audit_comment_ids_to_cleanup$: temporary table

comment_id: audit_comment_id M


user$: temporary table

user_id: user_id M

 

-- THE LAST TABLE

server: table

server_id: long_int

0

Thank you for data, but I don't understand where teamcity10_username comes from. When TeamCity writes data into this table it uses teamcity_username, not teamcity10_username. Are you sure no one patched data in meta_file_line table for some reason?

0

Nope, no patching done whatsoever.   We took the TeamCity 9 database and ran the TeamCity 10 docker over it.

0

Wiat hold on, maybe we *did* make a mistake there ... my bad ...

0

Oké, yes, the database schema got hacked up when it was copied.  Everything is fixed.  Sorry for the bother, please close this ticket.

0

Thank you for update!

0

Please sign in to leave a comment.