From: timeless%mozdev.org <> Date: Fri, 14 Jan 2005 17:51:36 +0000 (+0000) Subject: Bug 276237 Charting is completely broken - can't add datasets to list X-Git-Tag: bugzilla-2.18~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4540169ab0d88dcaa3f3644484a6d6657d2116f0;p=thirdparty%2Fbugzilla.git Bug 276237 Charting is completely broken - can't add datasets to list patch by Nick.Barnes@pobox.com r=mkanat r=justdave a=justdave --- diff --git a/checksetup.pl b/checksetup.pl index 6942f8a8dd..5201d1dc40 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -3886,11 +3886,15 @@ if (TableExists("user_series_map")) { RenameField('series_categories', 'category_id', 'id'); AddField("series", "public", "tinyint(1) not null default 0"); - + # Migrate public-ness across from user_series_map to new field - $dbh->do("UPDATE series SET series.public = 1 " . - "WHERE series.series_id = user_series_map.series_id " . - " AND user_series_map.user_id = 0"); + $sth = $dbh->prepare("SELECT series_id from user_series_map " . + "WHERE user_id = 0"); + $sth->execute(); + while (my ($public_series_id) = $sth->fetchrow_array()) { + $dbh->do("UPDATE series SET public = 1 " . + "WHERE series_id = $public_series_id"); + } $dbh->do("DROP TABLE user_series_map"); }