summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDavid Lawrence [:dkl] <dkl@mozilla.com>2014-06-17 08:30:28 +0200
committerByron Jones <glob@mozilla.com>2014-06-17 08:30:28 +0200
commitaaba5db2aed1ac418d6e4421c1c2760d9c739b70 (patch)
tree202f7b814883098c3a0f4b345624d7d54174c37a /extensions
parent0a2592d00b9d230f78b69c5808cbca108af54967 (diff)
downloadbugzilla-aaba5db2aed1ac418d6e4421c1c2760d9c739b70.tar.gz
bugzilla-aaba5db2aed1ac418d6e4421c1c2760d9c739b70.tar.xz
Bug 649691: Add a "mentor" and "mentored bug type" field to b.m.o
(schema only)
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Review/Extension.pm37
1 files changed, 37 insertions, 0 deletions
diff --git a/extensions/Review/Extension.pm b/extensions/Review/Extension.pm
index 3f3383697..6509218f3 100644
--- a/extensions/Review/Extension.pm
+++ b/extensions/Review/Extension.pm
@@ -670,6 +670,36 @@ sub db_schema_abstract_schema {
},
],
};
+
+ $args->{'schema'}->{'bug_mentors'} = {
+ FIELDS => [
+ bug_id => {
+ TYPE => 'INT3',
+ NOTNULL => 1,
+ REFERENCES => {
+ TABLE => 'bugs',
+ COLUMN => 'bug_id',
+ DELETE => 'CASCADE',
+ },
+ },
+ user_id => {
+ TYPE => 'INT3',
+ NOTNULL => 1,
+ REFERENCES => {
+ TABLE => 'profiles',
+ COLUMN => 'userid',
+ DELETE => 'CASCADE',
+ }
+ },
+ ],
+ INDEXES => [
+ bug_mentors_idx => {
+ FIELDS => [ 'bug_id', 'user_id' ],
+ TYPE => 'UNIQUE',
+ },
+ bug_mentors_bug_id_idx => [ 'bug_id' ],
+ ],
+ };
}
sub install_update_db {
@@ -690,6 +720,13 @@ sub install_update_db {
'profiles',
'needinfo_request_count', { TYPE => 'INT2', NOTNULL => 1, DEFAULT => 0 }
);
+ my $field = Bugzilla::Field->new({ name => 'bug_mentor' });
+ if (!$field) {
+ Bugzilla::Field->create({
+ name => 'bug_mentor',
+ description => 'Mentor'
+ });
+ }
}
sub install_filesystem {