summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2011-01-30 13:07:59 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2011-01-30 13:07:59 +0100
commit8fa9965e5476717e574f2674c6df8c4487874634 (patch)
tree91c01615dbb0b6d2b576c2311f578a0ae7c44b29 /Bugzilla/DB
parent95bfc797b43bd7f1d8f45ea629aa6119b51e8a29 (diff)
downloadbugzilla-8fa9965e5476717e574f2674c6df8c4487874634.tar.gz
bugzilla-8fa9965e5476717e574f2674c6df8c4487874634.tar.xz
Bug 616185: Move tags (aka lists of bugs) to their own DB tables
r/a=mkanat
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Schema.pm31
1 files changed, 30 insertions, 1 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index e2c1d22e4..2e1b3f78a 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -953,7 +953,6 @@ use constant ABSTRACT_SCHEMA => {
DELETE => 'CASCADE'}},
name => {TYPE => 'varchar(64)', NOTNULL => 1},
query => {TYPE => 'LONGTEXT', NOTNULL => 1},
- query_type => {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 0},
],
INDEXES => [
namedqueries_userid_idx => {FIELDS => [qw(userid name)],
@@ -979,6 +978,36 @@ use constant ABSTRACT_SCHEMA => {
],
},
+ tags => {
+ FIELDS => [
+ id => {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, PRIMARYKEY => 1},
+ name => {TYPE => 'varchar(64)', NOTNULL => 1},
+ user_id => {TYPE => 'INT3', NOTNULL => 1,
+ REFERENCES => {TABLE => 'profiles',
+ COLUMN => 'userid',
+ DELETE => 'CASCADE'}},
+ ],
+ INDEXES => [
+ tags_user_id_idx => {FIELDS => [qw(user_id name)], TYPE => 'UNIQUE'},
+ ],
+ },
+
+ bug_tag => {
+ FIELDS => [
+ bug_id => {TYPE => 'INT3', NOTNULL => 1,
+ REFERENCES => {TABLE => 'bugs',
+ COLUMN => 'bug_id',
+ DELETE => 'CASCADE'}},
+ tag_id => {TYPE => 'INT3', NOTNULL => 1,
+ REFERENCES => {TABLE => 'tags',
+ COLUMN => 'id',
+ DELETE => 'CASCADE'}},
+ ],
+ INDEXES => [
+ bug_tag_bug_id_idx => {FIELDS => [qw(bug_id tag_id)], TYPE => 'UNIQUE'},
+ ],
+ },
+
component_cc => {
FIELDS => [