summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-04-08 21:19:01 +0200
committerGitHub <noreply@github.com>2018-04-08 21:19:01 +0200
commite8f272c6f79dc8a919911d88a5b455bc67792f64 (patch)
tree01f8cd3965e1db810573f65508ded737d86d82fd /Bugzilla/Install
parent3293a1f85c9e20893e6823d1f83b667ec9ca9534 (diff)
downloadbugzilla-e8f272c6f79dc8a919911d88a5b455bc67792f64.tar.gz
bugzilla-e8f272c6f79dc8a919911d88a5b455bc67792f64.tar.xz
Bug 1427884 - Add upgrade tests from 4.2 to Harmony on mysql
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/DB.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 2c8a22448..0d63f68b9 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -3895,7 +3895,16 @@ 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(Bugzilla->params->{'nobody_user'});
+ my $nobody = Bugzilla::User->new({ name => Bugzilla->params->{'nobody_user'}, cache => 1 });
+ unless ($nobody) {
+ $nobody = Bugzilla::User->create(
+ {
+ login_name => Bugzilla->params->{'nobody_user'},
+ realname => 'Nobody (ok to assign bugs to)',
+ cryptpassword => '*',
+ }
+ );
+ }
$dbh->do('UPDATE groups SET owner_user_id = ?', undef, $nobody->id);
}