summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerv%gerv.net <>2004-12-11 06:53:11 +0100
committergerv%gerv.net <>2004-12-11 06:53:11 +0100
commitc1db00cc3c2c6f3a0c3ce74a7dff37b9e4c7bf4b (patch)
tree13c0a44cf096569003d023d86503e366bcd96762
parent5bf714033aa8cf54aacb1bef2addb636b76d1c74 (diff)
downloadbugzilla-c1db00cc3c2c6f3a0c3ce74a7dff37b9e4c7bf4b.tar.gz
bugzilla-c1db00cc3c2c6f3a0c3ce74a7dff37b9e4c7bf4b.tar.xz
Bug 264662: Don't delete old chart data. We'll document the problems instead. Patch by gerv; r,a=justdave.
-rwxr-xr-xchecksetup.pl16
1 files changed, 5 insertions, 11 deletions
diff --git a/checksetup.pl b/checksetup.pl
index db0f188a3..7b2ec0fef 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -3912,18 +3912,12 @@ if (TableExists("user_series_map")) {
# auto-incrementing sequence (Oracle again).
RenameField('series_categories', 'category_id', 'id');
- # We nuke all the chart data and re-import it, partly because there were
- # several data corruption bugs in the initial cut of the code, and partly
- # because otherwise migration is too complex.
- print "Deleting possibly-corrupt new-chart data " .
- "(it will be re-migrated) ...\n" unless $silent;
- $dbh->do("DELETE FROM series");
- $dbh->do("DELETE FROM series_data");
- $dbh->do("DELETE FROM series_categories");
-
- # No need to migrate the "publicness" from user_series_map, as we've just
- # deleted all the series!
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");
$dbh->do("DROP TABLE user_series_map");
}