2006-01-08 03:56:10 +00:00
|
|
|
# The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
# 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
# http://www.mozilla.org/MPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
# for the specific language governing rights and limitations under the
|
|
|
|
# License.
|
|
|
|
#
|
|
|
|
# The Original Code is Litmus.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is
|
|
|
|
# the Mozilla Corporation.
|
2006-01-25 17:03:40 +00:00
|
|
|
# Portions created by the Initial Developer are Copyright (C) 2006
|
2006-01-08 03:56:10 +00:00
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
|
|
|
# Chris Cooper <ccooper@deadsquid.com>
|
|
|
|
# Zach Lipton <zach@zachlipton.com>
|
|
|
|
|
|
|
|
# Litmus database schema
|
|
|
|
|
2006-01-19 00:03:31 +00:00
|
|
|
# IMPORTANT: Any changes (other than new tables) made here must also be made
|
|
|
|
# by adding --TABLE-- upgrading code to populatedb.pl to handle upgrades from
|
|
|
|
# previous versions of the schema.
|
|
|
|
|
2006-01-08 03:56:10 +00:00
|
|
|
our $table;
|
|
|
|
|
|
|
|
$table{branches} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'branch_id smallint(6) not null primary key auto_increment,
|
|
|
|
product_id tinyint(4) not null,
|
2006-01-08 03:56:10 +00:00
|
|
|
name varchar(64) not null,
|
|
|
|
detect_regexp varchar(255),
|
2006-06-05 04:07:29 +00:00
|
|
|
enabled tinyint(1) default 1,
|
2006-01-08 03:56:10 +00:00
|
|
|
|
|
|
|
index(product_id),
|
2006-06-05 04:07:29 +00:00
|
|
|
index(name),
|
|
|
|
index(detect_regexp),
|
|
|
|
index(enabled)
|
|
|
|
';
|
2006-01-08 03:56:10 +00:00
|
|
|
|
|
|
|
$table{build_type_lookup} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'build_type_id tinyint(4) not null primary key auto_increment,
|
2006-01-08 03:56:10 +00:00
|
|
|
name varchar(64) not null,
|
|
|
|
|
|
|
|
index(name)';
|
|
|
|
|
|
|
|
$table{exit_status_lookup} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'exit_status_id tinyint(4) not null primary key auto_increment,
|
2006-01-08 03:56:10 +00:00
|
|
|
name varchar(64) not null,
|
|
|
|
|
|
|
|
index(name)';
|
|
|
|
|
|
|
|
$table{locale_lookup} =
|
|
|
|
'abbrev varchar(16) not null primary key,
|
|
|
|
name varchar(64) not null,
|
|
|
|
|
|
|
|
index(name)';
|
|
|
|
|
|
|
|
$table{log_type_lookup} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'log_type_id tinyint(4) not null primary key auto_increment,
|
2006-01-08 03:56:10 +00:00
|
|
|
name varchar(64) not null,
|
|
|
|
|
|
|
|
index(name)';
|
|
|
|
|
|
|
|
$table{opsyses} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'opsys_id smallint(6) not null primary key auto_increment,
|
|
|
|
platform_id smallint(6) not null,
|
2006-01-08 03:56:10 +00:00
|
|
|
name varchar(64) not null,
|
|
|
|
detect_regexp varchar(255),
|
|
|
|
|
|
|
|
index(platform_id),
|
2006-06-05 04:07:29 +00:00
|
|
|
index(name),
|
|
|
|
index(detect_regexp)';
|
|
|
|
|
|
|
|
$table{platform_products} =
|
|
|
|
'platform_id smallint(6) not null,
|
|
|
|
product_id tinyint(4) not null,
|
|
|
|
|
|
|
|
primary key (platform_id, product_id)';
|
2006-01-08 03:56:10 +00:00
|
|
|
|
|
|
|
$table{platforms} =
|
|
|
|
'platform_id smallint not null primary key auto_increment,
|
|
|
|
name varchar(64) not null,
|
|
|
|
detect_regexp varchar(255),
|
|
|
|
iconpath varchar(255),
|
|
|
|
|
2006-06-05 04:07:29 +00:00
|
|
|
index(name),
|
|
|
|
index(detect_regexp),
|
|
|
|
index(iconpath)';
|
2006-01-08 03:56:10 +00:00
|
|
|
|
|
|
|
$table{products} =
|
|
|
|
'product_id tinyint not null primary key auto_increment,
|
|
|
|
name varchar(64) not null,
|
|
|
|
iconpath varchar(255),
|
2006-06-12 21:52:09 +00:00
|
|
|
enabled tinyint(1) default \'1\',
|
2006-01-08 03:56:10 +00:00
|
|
|
|
2006-06-05 04:07:29 +00:00
|
|
|
unique key(name),
|
|
|
|
index(iconpath),
|
2006-01-08 03:56:10 +00:00
|
|
|
index(enabled)';
|
|
|
|
|
2006-06-20 19:34:53 +00:00
|
|
|
$table{related_testcases} =
|
|
|
|
'testcase_id int(11) not null,
|
|
|
|
related_testcase_id int(11) not null,
|
|
|
|
|
|
|
|
primary key (testcase_id, related_testcase_id)';
|
|
|
|
|
2006-06-05 04:07:29 +00:00
|
|
|
$table{sessions} =
|
|
|
|
'session_id int(11) not null primary key auto_increment,
|
|
|
|
user_id int(11) not null,
|
|
|
|
sessioncookie varchar(255) not null,
|
|
|
|
expires datetime not null,
|
|
|
|
|
|
|
|
index(user_id),
|
|
|
|
index(sessioncookie),
|
|
|
|
index(expires)';
|
|
|
|
|
|
|
|
$table{subgroup_testgroups} =
|
|
|
|
'subgroup_id smallint(6) not null,
|
|
|
|
testgroup_id smallint(6) not null,
|
2006-06-13 18:29:33 +00:00
|
|
|
sort_order smallint(6) not null default "1",
|
2006-06-05 04:07:29 +00:00
|
|
|
|
2006-06-13 18:29:33 +00:00
|
|
|
primary key(subgroup_id, testgroup_id),
|
|
|
|
index(sort_order)';
|
2006-06-05 04:07:29 +00:00
|
|
|
|
2006-01-08 03:56:10 +00:00
|
|
|
$table{subgroups} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'subgroup_id smallint(6) not null primary key auto_increment,
|
2006-01-08 03:56:10 +00:00
|
|
|
name varchar(64) not null,
|
2006-06-05 04:07:29 +00:00
|
|
|
testrunner_group_id int(11),
|
2006-06-12 21:52:09 +00:00
|
|
|
enabled tinyint(1) default "1",
|
2006-06-05 04:07:29 +00:00
|
|
|
product_id tinyint(4) not null,
|
2006-01-08 03:56:10 +00:00
|
|
|
|
|
|
|
index(name),
|
2006-02-24 22:02:41 +00:00
|
|
|
index(testrunner_group_id),
|
2006-06-05 04:07:29 +00:00
|
|
|
index(enabled),
|
|
|
|
index(product_id)';
|
2006-01-08 03:56:10 +00:00
|
|
|
|
|
|
|
$table{test_format_lookup} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'format_id tinyint(4) not null primary key auto_increment,
|
2006-01-08 03:56:10 +00:00
|
|
|
name varchar(255) not null,
|
|
|
|
|
|
|
|
index(name)';
|
|
|
|
|
2006-02-24 22:02:41 +00:00
|
|
|
$table{test_result_bugs} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'test_result_id int(11) not null primary key auto_increment,
|
2006-01-08 03:56:10 +00:00
|
|
|
last_updated datetime not null,
|
|
|
|
submission_time datetime not null,
|
2006-06-05 04:07:29 +00:00
|
|
|
user_id int(11),
|
|
|
|
bug_id int(11) not null,
|
2006-01-08 03:56:10 +00:00
|
|
|
|
|
|
|
index(test_result_id),
|
|
|
|
index(last_updated),
|
|
|
|
index(submission_time),
|
|
|
|
index(user_id)';
|
|
|
|
|
|
|
|
$table{test_result_comments} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'comment_id int(11) not null primary key auto_increment,
|
|
|
|
test_result_id int(11) not null,
|
2006-01-08 03:56:10 +00:00
|
|
|
last_updated datetime not null,
|
|
|
|
submission_time datetime not null,
|
2006-06-05 04:07:29 +00:00
|
|
|
user_id int(11),
|
2006-01-08 03:56:10 +00:00
|
|
|
comment text,
|
|
|
|
|
|
|
|
index(test_result_id),
|
|
|
|
index(last_updated),
|
|
|
|
index(submission_time),
|
|
|
|
index(user_id)';
|
|
|
|
|
|
|
|
$table{test_result_logs} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'log_id int(11) not null primary key auto_increment,
|
2006-01-08 03:56:10 +00:00
|
|
|
last_updated datetime not null,
|
|
|
|
submission_time datetime not null,
|
2006-06-22 23:21:38 +00:00
|
|
|
log_text longtext,
|
2006-06-05 04:07:29 +00:00
|
|
|
log_type_id tinyint(4) not null default \'1\',
|
2006-01-08 03:56:10 +00:00
|
|
|
|
|
|
|
index(last_updated),
|
|
|
|
index(submission_time),
|
2006-01-25 17:03:40 +00:00
|
|
|
index(log_type_id),
|
2006-06-22 23:21:38 +00:00
|
|
|
index(log_text(255))';
|
|
|
|
|
|
|
|
$table{testresult_logs_join} =
|
|
|
|
'test_result_id int(11) not null,
|
|
|
|
log_id int(11) not null,
|
|
|
|
|
|
|
|
primary key(test_result_id, log_id)';
|
2006-01-25 17:03:40 +00:00
|
|
|
|
2006-01-08 03:56:10 +00:00
|
|
|
|
|
|
|
$table{test_result_status_lookup} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'result_status_id smallint(6) not null primary key auto_increment,
|
2006-01-08 03:56:10 +00:00
|
|
|
name varchar(64) not null,
|
|
|
|
style varchar(255) not null,
|
|
|
|
class_name varchar(16),
|
|
|
|
|
|
|
|
index(name),
|
|
|
|
index(style),
|
|
|
|
index(class_name)';
|
|
|
|
|
|
|
|
$table{test_results} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'testresult_id int(11) not null primary key auto_increment,
|
|
|
|
testcase_id int(11) not null,
|
2006-01-08 03:56:10 +00:00
|
|
|
last_updated datetime,
|
|
|
|
submission_time datetime,
|
2006-06-05 04:07:29 +00:00
|
|
|
user_id int(11),
|
|
|
|
opsys_id smallint(6),
|
|
|
|
branch_id smallint(6),
|
2006-06-12 21:52:09 +00:00
|
|
|
build_id int(10) unsigned,
|
2006-01-08 03:56:10 +00:00
|
|
|
user_agent varchar(255),
|
2006-06-05 04:07:29 +00:00
|
|
|
result_status_id smallint(6),
|
|
|
|
build_type_id tinyint(4) not null default \'1\',
|
2006-01-08 03:56:10 +00:00
|
|
|
machine_name varchar(64),
|
2006-06-05 04:07:29 +00:00
|
|
|
exit_status_id tinyint(4) not null default \'1\',
|
|
|
|
duration_ms int(11) unsigned,
|
|
|
|
talkback_id int(11) unsigned,
|
2006-01-08 03:56:10 +00:00
|
|
|
locale_abbrev varchar(16) not null default \'en-US\',
|
2006-01-25 17:03:40 +00:00
|
|
|
valid tinyint(1) not null default \'1\',
|
|
|
|
vetted tinyint(1) not null default \'0\',
|
|
|
|
validated_by_user_id int(11) default \'0\',
|
|
|
|
vetted_by_user_id int(11) default \'0\',
|
|
|
|
validated_timestamp datetime,
|
|
|
|
vetted_timestamp datetime,
|
2006-06-27 00:39:09 +00:00
|
|
|
is_automated_result tinyint(1) not null default \'0\',
|
2006-01-08 03:56:10 +00:00
|
|
|
|
2006-06-05 04:07:29 +00:00
|
|
|
index(testcase_id),
|
2006-01-08 03:56:10 +00:00
|
|
|
index(last_updated),
|
|
|
|
index(submission_time),
|
|
|
|
index(user_id),
|
|
|
|
index(opsys_id),
|
|
|
|
index(branch_id),
|
2006-06-05 04:07:29 +00:00
|
|
|
index(build_id),
|
2006-01-08 03:56:10 +00:00
|
|
|
index(user_agent),
|
2006-06-05 04:07:29 +00:00
|
|
|
index(result_status_id),
|
2006-01-08 03:56:10 +00:00
|
|
|
index(build_type_id),
|
|
|
|
index(machine_name),
|
|
|
|
index(exit_status_id),
|
|
|
|
index(duration_ms),
|
|
|
|
index(talkback_id),
|
2006-01-25 17:03:40 +00:00
|
|
|
index(locale_abbrev),
|
|
|
|
index(valid),
|
|
|
|
index(vetted),
|
|
|
|
index(validated_by_user_id),
|
|
|
|
index(vetted_by_user_id),
|
|
|
|
index(validated_timestamp),
|
|
|
|
index(vetted_timestamp)';
|
2006-06-05 04:07:29 +00:00
|
|
|
|
2006-07-22 01:18:48 +00:00
|
|
|
$table{test_run_criteria} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'test_run_id int(11) not null,
|
2006-07-22 01:18:48 +00:00
|
|
|
build_id int(10) unsigned not null,
|
|
|
|
platform_id smallint(6) not null default "0",
|
|
|
|
opsys_id smallint(6) not null default "0",
|
2006-06-05 04:07:29 +00:00
|
|
|
|
2006-07-22 01:18:48 +00:00
|
|
|
primary key(test_run_id,build_id,platform_id,opsys_id)';
|
2006-06-05 04:07:29 +00:00
|
|
|
|
2006-07-22 01:18:48 +00:00
|
|
|
$table{test_run_testgroups} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'test_run_id int(11) not null,
|
2006-07-22 01:18:48 +00:00
|
|
|
testgroup_id smallint(6) not null,
|
2006-06-05 04:07:29 +00:00
|
|
|
|
2006-07-22 01:18:48 +00:00
|
|
|
primary key(test_run_id,testgroup_id)';
|
2006-06-05 04:07:29 +00:00
|
|
|
|
|
|
|
$table{test_runs} =
|
2006-06-12 21:46:44 +00:00
|
|
|
'test_run_id int(11) not null primary key auto_increment,
|
2006-06-05 04:07:29 +00:00
|
|
|
name varchar(64) not null,
|
|
|
|
description varchar(255),
|
|
|
|
start_timestamp datetime not null,
|
|
|
|
finish_timestamp datetime not null,
|
|
|
|
enabled tinyint(1) not null default "1",
|
2006-07-22 01:18:48 +00:00
|
|
|
product_id tinyint(4) not null,
|
|
|
|
branch_id smallint(6) not null,
|
|
|
|
creation_date datetime not null,
|
|
|
|
last_updated datetime not null,
|
|
|
|
author_id int(11) not null,
|
2006-06-05 04:07:29 +00:00
|
|
|
|
|
|
|
index(name),
|
|
|
|
index(description),
|
|
|
|
index(start_timestamp),
|
|
|
|
index(finish_timestamp),
|
2006-07-22 01:18:48 +00:00
|
|
|
index(enabled),
|
|
|
|
index(product_id),
|
|
|
|
index(branch_id),
|
|
|
|
index(creation_date),
|
|
|
|
index(last_updated),
|
|
|
|
index(author_id)';
|
2006-06-05 04:07:29 +00:00
|
|
|
|
|
|
|
$table{testcase_subgroups} =
|
|
|
|
'testcase_id int(11) not null,
|
|
|
|
subgroup_id smallint(6) not null,
|
2006-06-13 18:29:33 +00:00
|
|
|
sort_order smallint(6) not null default "1",
|
2006-06-05 04:07:29 +00:00
|
|
|
|
2006-06-13 18:29:33 +00:00
|
|
|
primary key(testcase_id, subgroup_id),
|
|
|
|
index(sort_order)';
|
2006-06-05 04:07:29 +00:00
|
|
|
|
|
|
|
$table{testcases} =
|
|
|
|
'testcase_id int(11) not null primary key auto_increment,
|
2006-01-08 03:56:10 +00:00
|
|
|
summary varchar(255) not null,
|
|
|
|
details text,
|
2006-02-24 22:02:41 +00:00
|
|
|
enabled tinyint(1) not null default \'1\',
|
2006-06-12 21:52:09 +00:00
|
|
|
community_enabled tinyint(1) default \'1\',
|
2006-06-05 04:07:29 +00:00
|
|
|
format_id tinyint(4) not null default \'1\',
|
|
|
|
regression_bug_id int(11),
|
2006-01-08 03:56:10 +00:00
|
|
|
steps longtext,
|
|
|
|
expected_results longtext,
|
2006-06-05 04:07:29 +00:00
|
|
|
author_id int(11) not null,
|
2006-01-08 03:56:10 +00:00
|
|
|
creation_date datetime not null,
|
|
|
|
last_updated datetime not null,
|
2006-06-05 04:07:29 +00:00
|
|
|
version smallint(6) not null default \'1\',
|
|
|
|
testrunner_case_id int(11),
|
|
|
|
testrunner_case_version int(11),
|
|
|
|
product_id tinyint(4) not null,
|
2006-01-08 03:56:10 +00:00
|
|
|
|
|
|
|
index(summary),
|
2006-06-05 04:07:29 +00:00
|
|
|
index(enabled),
|
2006-01-08 03:56:10 +00:00
|
|
|
index(community_enabled),
|
2006-06-05 04:07:29 +00:00
|
|
|
index(format_id),
|
2006-01-08 03:56:10 +00:00
|
|
|
index(regression_bug_id),
|
|
|
|
index(steps(255)),
|
|
|
|
index(expected_results(255)),
|
|
|
|
index(author_id),
|
|
|
|
index(creation_date),
|
|
|
|
index(last_updated),
|
2006-06-05 04:07:29 +00:00
|
|
|
index(testrunner_case_id),
|
|
|
|
index(testrunner_case_version),
|
|
|
|
index(product_id),
|
|
|
|
|
|
|
|
fulltext key(summary,steps,expected_results)';
|
|
|
|
|
|
|
|
$table{testgroup_branches} =
|
|
|
|
'testgroup_id smallint(6) not null,
|
|
|
|
branch_id smallint(6) not null,
|
|
|
|
|
|
|
|
primary key(testgroup_id, branch_id)';
|
|
|
|
|
|
|
|
$table{testgroups} =
|
|
|
|
'testgroup_id smallint(6) not null primary key auto_increment,
|
|
|
|
product_id tinyint(4) not null,
|
|
|
|
name varchar(64) not null,
|
|
|
|
enabled tinyint(1) default "1",
|
|
|
|
testrunner_plan_id int(11),
|
|
|
|
|
|
|
|
index(product_id),
|
|
|
|
index(name),
|
|
|
|
index(enabled),
|
|
|
|
index(testrunner_plan_id)';
|
2006-01-08 03:56:10 +00:00
|
|
|
|
|
|
|
$table{users} =
|
2006-06-05 04:07:29 +00:00
|
|
|
'user_id int(11) not null primary key auto_increment,
|
2006-01-08 03:56:10 +00:00
|
|
|
bugzilla_uid int,
|
2006-06-05 04:07:29 +00:00
|
|
|
email varchar(255) not null,
|
2006-01-08 03:56:10 +00:00
|
|
|
password varchar(255),
|
|
|
|
realname varchar(255),
|
2006-01-19 00:03:31 +00:00
|
|
|
irc_nickname varchar(32),
|
2006-02-24 22:02:41 +00:00
|
|
|
enabled tinyint(1),
|
2006-01-08 03:56:10 +00:00
|
|
|
is_admin tinyint(1),
|
2006-06-16 17:27:54 +00:00
|
|
|
authtoken varchar(255),
|
2006-01-08 03:56:10 +00:00
|
|
|
|
|
|
|
index(bugzilla_uid),
|
2006-01-25 17:03:40 +00:00
|
|
|
unique index(email),
|
2006-06-16 17:27:54 +00:00
|
|
|
index(irc_nickname),
|
2006-06-05 04:07:29 +00:00
|
|
|
index(password),
|
|
|
|
index(realname),
|
2006-06-12 21:52:09 +00:00
|
|
|
index(enabled),
|
2006-06-16 17:27:54 +00:00
|
|
|
index(is_admin),
|
2006-06-16 18:36:51 +00:00
|
|
|
index(email, realname, irc_nickname)';
|