diff options
Diffstat (limited to 'Bugzilla/DB/Schema.pm')
-rw-r--r-- | Bugzilla/DB/Schema.pm | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 1e598c61e..89f0e1ecb 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -342,6 +342,8 @@ use constant ABSTRACT_SCHEMA => { bugs_activity => { FIELDS => [ + id => {TYPE => 'INTSERIAL', NOTNULL => 1, + PRIMARYKEY => 1}, bug_id => {TYPE => 'INT3', NOTNULL => 1, REFERENCES => {TABLE => 'bugs', COLUMN => 'bug_id', @@ -358,8 +360,8 @@ use constant ABSTRACT_SCHEMA => { REFERENCES => {TABLE => 'fielddefs', COLUMN => 'id'}}, added => {TYPE => 'varchar(255)'}, - removed => {TYPE => 'TINYTEXT'}, - comment_id => {TYPE => 'INT3', + removed => {TYPE => 'varchar(255)'}, + comment_id => {TYPE => 'INT4', REFERENCES => { TABLE => 'longdescs', COLUMN => 'comment_id', DELETE => 'CASCADE'}}, @@ -370,6 +372,7 @@ use constant ABSTRACT_SCHEMA => { bugs_activity_bug_when_idx => ['bug_when'], bugs_activity_fieldid_idx => ['fieldid'], bugs_activity_added_idx => ['added'], + bugs_activity_removed_idx => ['removed'], ], }, @@ -393,7 +396,7 @@ use constant ABSTRACT_SCHEMA => { longdescs => { FIELDS => [ - comment_id => {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, + comment_id => {TYPE => 'INTSERIAL', NOTNULL => 1, PRIMARYKEY => 1}, bug_id => {TYPE => 'INT3', NOTNULL => 1, REFERENCES => {TABLE => 'bugs', @@ -433,7 +436,8 @@ use constant ABSTRACT_SCHEMA => { DELETE => 'CASCADE'}}, ], INDEXES => [ - dependencies_blocked_idx => ['blocked'], + dependencies_blocked_idx => {FIELDS => [qw(blocked dependson)], + TYPE => 'UNIQUE'}, dependencies_dependson_idx => ['dependson'], ], }, @@ -651,8 +655,8 @@ use constant ABSTRACT_SCHEMA => { DELETE => 'CASCADE'}}, ], INDEXES => [ - flaginclusions_type_id_idx => - [qw(type_id product_id component_id)], + flaginclusions_type_id_idx => { FIELDS => [qw(type_id product_id component_id)], + TYPE => 'UNIQUE' }, ], }, @@ -672,8 +676,8 @@ use constant ABSTRACT_SCHEMA => { DELETE => 'CASCADE'}}, ], INDEXES => [ - flagexclusions_type_id_idx => - [qw(type_id product_id component_id)], + flagexclusions_type_id_idx => { FIELDS => [qw(type_id product_id component_id)], + TYPE => 'UNIQUE' }, ], }, @@ -915,6 +919,8 @@ use constant ABSTRACT_SCHEMA => { profiles_activity => { FIELDS => [ + id => {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, + PRIMARYKEY => 1}, userid => {TYPE => 'INT3', NOTNULL => 1, REFERENCES => {TABLE => 'profiles', COLUMN => 'userid', @@ -952,6 +958,23 @@ use constant ABSTRACT_SCHEMA => { ], }, + email_bug_ignore => { + FIELDS => [ + user_id => {TYPE => 'INT3', NOTNULL => 1, + REFERENCES => {TABLE => 'profiles', + COLUMN => 'userid', + DELETE => 'CASCADE'}}, + bug_id => {TYPE => 'INT3', NOTNULL => 1, + REFERENCES => {TABLE => 'bugs', + COLUMN => 'bug_id', + DELETE => 'CASCADE'}}, + ], + INDEXES => [ + email_bug_ignore_user_id_idx => {FIELDS => [qw(user_id bug_id)], + TYPE => 'UNIQUE'}, + ], + }, + watch => { FIELDS => [ watcher => {TYPE => 'INT3', NOTNULL => 1, |