From b6b83df873a1509797235738e00f9e6307eca876 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Tue, 20 May 2014 02:19:51 -0400 Subject: Bug 1000917 - Backport upstream bug 489028 to bmo/4.2 to allow user last visit searching --- Bugzilla/DB/Schema.pm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Bugzilla/DB') diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index d8f3e175a..cbcb5b26c 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -1714,6 +1714,25 @@ use constant ABSTRACT_SCHEMA => { ], }, + bug_user_last_visit => { + FIELDS => [ + id => {TYPE => 'INTSERIAL', NOTNULL => 1, + PRIMARYKEY => 1}, + 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'}}, + last_visit_ts => {TYPE => 'DATETIME', NOTNULL => 1}, + ], + INDEXES => [ + bug_user_last_visit_idx => {FIELDS => ['user_id', 'bug_id'], + TYPE => 'UNIQUE'} + ], + }, }; # Foreign Keys are added in Bugzilla::DB::bz_add_field_tables -- cgit v1.2.3-24-g4f1b From 7ea36c899372e8e113935ff036e992a819d786b6 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Wed, 28 May 2014 11:04:37 -0400 Subject: Revert previous commit to re-apply with the schema change in a separate commit. This reverts commit b6b83df873a1509797235738e00f9e6307eca876. --- Bugzilla/DB/Schema.pm | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'Bugzilla/DB') diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index cbcb5b26c..d8f3e175a 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -1714,25 +1714,6 @@ use constant ABSTRACT_SCHEMA => { ], }, - bug_user_last_visit => { - FIELDS => [ - id => {TYPE => 'INTSERIAL', NOTNULL => 1, - PRIMARYKEY => 1}, - 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'}}, - last_visit_ts => {TYPE => 'DATETIME', NOTNULL => 1}, - ], - INDEXES => [ - bug_user_last_visit_idx => {FIELDS => ['user_id', 'bug_id'], - TYPE => 'UNIQUE'} - ], - }, }; # Foreign Keys are added in Bugzilla::DB::bz_add_field_tables -- cgit v1.2.3-24-g4f1b From 24a16ae497460834719d6214a7e73ecc7982f9fa Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Wed, 28 May 2014 11:30:47 -0400 Subject: Bug 1000917 - allow user last visit searching (schema only) --- Bugzilla/DB/Schema.pm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Bugzilla/DB') diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index d8f3e175a..cbcb5b26c 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -1714,6 +1714,25 @@ use constant ABSTRACT_SCHEMA => { ], }, + bug_user_last_visit => { + FIELDS => [ + id => {TYPE => 'INTSERIAL', NOTNULL => 1, + PRIMARYKEY => 1}, + 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'}}, + last_visit_ts => {TYPE => 'DATETIME', NOTNULL => 1}, + ], + INDEXES => [ + bug_user_last_visit_idx => {FIELDS => ['user_id', 'bug_id'], + TYPE => 'UNIQUE'} + ], + }, }; # Foreign Keys are added in Bugzilla::DB::bz_add_field_tables -- cgit v1.2.3-24-g4f1b