From 841b5d3961f31277c424a4432fc51f0ac4bf093f Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sun, 6 Sep 2009 22:45:51 +0000 Subject: Bug 176002: Move duplicate statistics into the db Patch by Max Kanat-Alexander r=LpSolit, a=LpSolit --- Bugzilla/DB/Schema.pm | 3 ++- Bugzilla/Install/DB.pm | 4 ++++ Bugzilla/Install/Filesystem.pm | 7 +++++-- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'Bugzilla') diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 583b49352..5e8c49ccf 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -352,7 +352,7 @@ use constant ABSTRACT_SCHEMA => { fieldid => {TYPE => 'INT3', NOTNULL => 1, REFERENCES => {TABLE => 'fielddefs', COLUMN => 'id'}}, - added => {TYPE => 'TINYTEXT'}, + added => {TYPE => 'varchar(255)'}, removed => {TYPE => 'TINYTEXT'}, ], INDEXES => [ @@ -360,6 +360,7 @@ use constant ABSTRACT_SCHEMA => { bugs_activity_who_idx => ['who'], bugs_activity_bug_when_idx => ['bug_when'], bugs_activity_fieldid_idx => ['fieldid'], + bugs_activity_added_idx => ['added'], ], }, diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index dd4b2fe1d..d39d1a770 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -574,6 +574,10 @@ sub update_table_definitions { _convert_disallownew_to_isactive(); + $dbh->bz_alter_column('bugs_activity', 'added', + { TYPE => 'varchar(255)' }); + $dbh->bz_add_index('bugs_activity', 'bugs_activity_added_idx', ['added']); + ################################################################ # New --TABLE-- changes should go *** A B O V E *** this point # ################################################################ diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm index fe9783805..763fd85bf 100644 --- a/Bugzilla/Install/Filesystem.pm +++ b/Bugzilla/Install/Filesystem.pm @@ -157,8 +157,6 @@ sub FILESYSTEM { # Readable directories "$datadir/mining" => { files => $ws_readable, dirs => $ws_dir_readable }, - "$datadir/duplicates" => { files => $ws_readable, - dirs => $ws_dir_readable }, "$libdir/Bugzilla" => { files => $ws_readable, dirs => $ws_dir_readable }, $extlib => { files => $ws_readable, @@ -379,6 +377,11 @@ EOT unlink "$datadir/duplicates.rdf"; unlink "$datadir/duplicates-old.rdf"; } + + if (-e "$datadir/duplicates") { + print "Removing duplicates directory...\n"; + rmtree("$datadir/duplicates"); + } } # A simple helper for creating "empty" CSS files. -- cgit v1.2.3-24-g4f1b