From f0c7611262b3948e72e8a18a036569a78f3b51f2 Mon Sep 17 00:00:00 2001 From: "wurblzap%gmail.com" <> Date: Fri, 14 Jul 2006 03:07:57 +0000 Subject: Bug 69000: Permit a stored query to be marked "shared" and accessible by other users. Patch by Marc Schumann , r=vladd, a=myk --- Bugzilla/DB/Schema.pm | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'Bugzilla/DB') diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 62a3da445..7c848bd5b 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -666,9 +666,10 @@ use constant ABSTRACT_SCHEMA => { namedqueries => { FIELDS => [ + id => {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, + PRIMARYKEY => 1}, userid => {TYPE => 'INT3', NOTNULL => 1}, name => {TYPE => 'varchar(64)', NOTNULL => 1}, - linkinfooter => {TYPE => 'BOOLEAN', NOTNULL => 1}, query => {TYPE => 'MEDIUMTEXT', NOTNULL => 1}, query_type => {TYPE => 'BOOLEAN', NOTNULL => 1}, ], @@ -678,6 +679,18 @@ use constant ABSTRACT_SCHEMA => { ], }, + namedqueries_link_in_footer => { + FIELDS => [ + namedquery_id => {TYPE => 'INT3', NOTNULL => 1}, + user_id => {TYPE => 'INT3', NOTNULL => 1}, + ], + INDEXES => [ + namedqueries_link_in_footer_id_idx => {FIELDS => [qw(namedquery_id user_id)], + TYPE => 'UNIQUE'}, + namedqueries_link_in_footer_userid_idx => ['user_id'], + ], + }, + # Authentication # -------------- @@ -806,6 +819,20 @@ use constant ABSTRACT_SCHEMA => { ], }, + # This table determines which groups a user must be a member of + # in order to see a named query somebody else shares. + namedquery_group_map => { + FIELDS => [ + namedquery_id => {TYPE => 'INT3', NOTNULL => 1}, + group_id => {TYPE => 'INT3', NOTNULL => 1}, + ], + INDEXES => [ + namedquery_group_map_namedquery_id_idx => + {FIELDS => [qw(namedquery_id)], TYPE => 'UNIQUE'}, + namedquery_group_map_group_id_idx => ['group_id'], + ], + }, + category_group_map => { FIELDS => [ category_id => {TYPE => 'INT2', NOTNULL => 1}, -- cgit v1.2.3-24-g4f1b