summaryrefslogtreecommitdiffstats
path: root/checksetup.pl
diff options
context:
space:
mode:
authorwurblzap%gmail.com <>2006-07-14 05:07:57 +0200
committerwurblzap%gmail.com <>2006-07-14 05:07:57 +0200
commitf0c7611262b3948e72e8a18a036569a78f3b51f2 (patch)
tree54b0e146d4f8fd3c466002728261c895d7709034 /checksetup.pl
parent09495a118b165d60d17780a8623318c19d6ffae6 (diff)
downloadbugzilla-f0c7611262b3948e72e8a18a036569a78f3b51f2.tar.gz
bugzilla-f0c7611262b3948e72e8a18a036569a78f3b51f2.tar.xz
Bug 69000: Permit a stored query to be marked "shared" and accessible by other users.
Patch by Marc Schumann <wurblzap@gmail.com>, r=vladd, a=myk
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl18
1 files changed, 16 insertions, 2 deletions
diff --git a/checksetup.pl b/checksetup.pl
index a934b6519..ba7e2e59a 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -2319,8 +2319,6 @@ if (!$dbh->bz_index_info('profiles', 'profiles_login_name_idx') ||
$dbh->bz_add_column('profiles', 'mybugslink', {TYPE => 'BOOLEAN', NOTNULL => 1,
DEFAULT => 'TRUE'});
-$dbh->bz_add_column('namedqueries', 'linkinfooter',
- {TYPE => 'BOOLEAN', NOTNULL => 1}, 0);
my $comp_init_owner = $dbh->bz_column_info('components', 'initialowner');
if ($comp_init_owner && $comp_init_owner->{TYPE} eq 'TINYTEXT') {
@@ -4369,6 +4367,22 @@ if (-e "$datadir/versioncache") {
unlink "$datadir/versioncache";
}
+# 2006-07-01 wurblzap@gmail.com -- Bug 69000
+$dbh->bz_add_column('namedqueries', 'id',
+ {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, PRIMARYKEY => 1});
+if ($dbh->bz_column_info("namedqueries", "linkinfooter")) {
+ # Move link-in-footer information into a table of its own.
+ my $sth_read = $dbh->prepare('SELECT id, userid
+ FROM namedqueries
+ WHERE linkinfooter = 1');
+ my $sth_write = $dbh->prepare('INSERT INTO namedqueries_link_in_footer
+ (namedquery_id, user_id) VALUES (?, ?)');
+ $sth_read->execute();
+ while (my ($id, $userid) = $sth_read->fetchrow_array()) {
+ $sth_write->execute($id, $userid);
+ }
+ $dbh->bz_drop_column("namedqueries", "linkinfooter");
+}
# If you had to change the --TABLE-- definition in any way, then add your
# differential change code *** A B O V E *** this comment.