summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install/DB.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Install/DB.pm')
-rw-r--r--Bugzilla/Install/DB.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 867aefe19..2d454b81a 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -754,6 +754,8 @@ sub update_table_definitions {
$dbh->bz_add_column('profiles', 'mfa', { TYPE => 'varchar(8)', , DEFAULT => "''" });
+ _migrate_group_owners();
+
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
################################################################
@@ -3883,6 +3885,14 @@ sub _add_restrict_ipaddr {
$dbh->do("UPDATE logincookies SET restrict_ipaddr = 1 WHERE ipaddr IS NOT NULL");
}
+sub _migrate_group_owners {
+ my $dbh = Bugzilla->dbh;
+ return if $dbh->bz_column_info('groups', 'owner_user_id');
+ $dbh->bz_add_column('groups', 'owner_user_id', {TYPE => 'INT3'});
+ my $nobody = Bugzilla::User->check('nobody@mozilla.org');
+ $dbh->do('UPDATE groups SET owner_user_id = ?', undef, $nobody->id);
+}
+
1;
__END__