summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-09-01 21:41:54 +0200
committerDavid Lawrence <dkl@mozilla.com>2015-09-01 21:41:54 +0200
commitf072be241bc5335a86758e3f6a1fa48cd7762f2d (patch)
treecad5c6ecd8dc5ec965d1970866677d21ab94d45b /Bugzilla/Install
parent7c39ca2f98f2f5431713ad387849217f12cc03c2 (diff)
downloadbugzilla-f072be241bc5335a86758e3f6a1fa48cd7762f2d.tar.gz
bugzilla-f072be241bc5335a86758e3f6a1fa48cd7762f2d.tar.xz
Bug 1196618: add support for group owners (schema only)
Diffstat (limited to 'Bugzilla/Install')
-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__