summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-08-05 07:24:47 +0200
committerlpsolit%gmail.com <>2006-08-05 07:24:47 +0200
commit38c7d0766195d9d84fcd81bc23b9c71bff5bea6d (patch)
treef3688f465408bcccf98c6bf604b3023011dddd2b /Bugzilla/Install
parented12ad1849d654f8fb710d093c7aaf92f35e56ab (diff)
downloadbugzilla-38c7d0766195d9d84fcd81bc23b9c71bff5bea6d.tar.gz
bugzilla-38c7d0766195d9d84fcd81bc23b9c71bff5bea6d.tar.xz
Bug 305941: Remove profiles.refreshed_when and groups.last_changed - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/DB.pm20
1 files changed, 5 insertions, 15 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 9b29bbc76..5fe84a4f4 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -459,7 +459,11 @@ sub update_table_definitions {
{TYPE => 'INT2', NOTNULL => 1, DEFAULT => 0});
$dbh->bz_alter_column('products', 'votestoconfirm',
{TYPE => 'INT2', NOTNULL => 1, DEFAULT => 0});
-
+
+ # 2006-08-04 LpSolit@gmail.com - Bug 305941
+ $dbh->bz_drop_column('profiles', 'refreshed_when');
+ $dbh->bz_drop_column('groups', 'last_changed');
+
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
################################################################
@@ -1315,9 +1319,6 @@ sub _convert_groups_system_from_groupset {
# The groups system needs to be converted if groupset exists
if ($dbh->bz_column_info("profiles", "groupset")) {
- $dbh->bz_add_column('groups', 'last_changed',
- {TYPE => 'DATETIME', NOTNULL => 1}, '0000-00-00 00:00:00');
-
# Some mysql versions will promote any unique key to primary key
# so all unique keys are removed first and then added back in
$dbh->bz_drop_index('groups', 'groups_bit_idx');
@@ -1331,8 +1332,6 @@ sub _convert_groups_system_from_groupset {
$dbh->bz_add_index('groups', 'groups_name_idx',
{TYPE => 'UNIQUE', FIELDS => [qw(name)]});
- $dbh->bz_add_column('profiles', 'refreshed_when',
- {TYPE => 'DATETIME', NOTNULL => 1}, '0000-00-00 00:00:00');
# Convert all existing groupset records to map entries before removing
# groupset fields or removing "bit" from groups.
@@ -1979,9 +1978,6 @@ sub _add_user_group_map_grant_type {
$dbh->bz_add_index('user_group_map', 'user_group_map_user_id_idx',
{TYPE => 'UNIQUE',
FIELDS => [qw(user_id group_id grant_type isbless)]});
-
- # Make sure groups get rederived
- $dbh->do("UPDATE groups SET last_changed = NOW() WHERE name = 'admin'");
}
}
@@ -2065,12 +2061,6 @@ sub _rename_votes_count_and_force_group_refresh {
# Renaming the 'count' column in the votes table because Sybase doesn't
# like it
if ($dbh->bz_column_info('votes', 'count')) {
- # 2003-04-24 - myk@mozilla.org/bbaetz@acm.org, bug 201018
- # Force all cached groups to be updated at login, due to security bug
- # Do this here, inside the next schema change block, so that it doesn't
- # get invalidated on every checksetup run.
- $dbh->do("UPDATE profiles SET refreshed_when='1900-01-01 00:00:00'");
-
$dbh->bz_rename_column('votes', 'count', 'vote_count');
}
}