From e8f272c6f79dc8a919911d88a5b455bc67792f64 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Sun, 8 Apr 2018 15:19:01 -0400 Subject: Bug 1427884 - Add upgrade tests from 4.2 to Harmony on mysql --- Bugzilla/Group.pm | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'Bugzilla/Group.pm') diff --git a/Bugzilla/Group.pm b/Bugzilla/Group.pm index fe2a90c05..06491f6a0 100644 --- a/Bugzilla/Group.pm +++ b/Bugzilla/Group.pm @@ -26,17 +26,24 @@ use Scalar::Util qw(blessed); use constant IS_CONFIG => 1; -use constant DB_COLUMNS => qw( - groups.id - groups.name - groups.description - groups.isbuggroup - groups.userregexp - groups.isactive - groups.icon_url - groups.owner_user_id - groups.idle_member_removal -); +sub DB_COLUMNS { + my $class = shift; + my @columns = qw( + id + name + description + isbuggroup + userregexp + isactive + icon_url + owner_user_id + idle_member_removal + ); + my $dbh = Bugzilla->dbh; + my $table = $class->DB_TABLE; + + return map { "$table.$_" } grep { $dbh->bz_column_info($table, $_) } @columns; +} use constant DB_TABLE => 'groups'; -- cgit v1.2.3-24-g4f1b