summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorSimon Green <sgreen@redhat.com>2014-08-14 01:40:47 +0200
committerSimon Green <sgreen@redhat.com>2014-08-14 01:40:47 +0200
commit424b21e37cd9aeac01588ce0defd3ee665944b1d (patch)
tree594aa91a4fafc7c30d26e0ee9a160f62bf4d063f /Bugzilla/Install
parent6dbcec07eba4b0910c883141a85b0b9928b85f32 (diff)
downloadbugzilla-424b21e37cd9aeac01588ce0defd3ee665944b1d.tar.gz
bugzilla-424b21e37cd9aeac01588ce0defd3ee665944b1d.tar.xz
Bug 1012506 - Allow a bug to have multiple aliases
r=dkl, a=sgreen
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/DB.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index dd0f3608b..b136e6d83 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -727,6 +727,9 @@ sub update_table_definitions {
# 2014-07-27 LpSolit@gmail.com - Bug 1044561
_fix_user_api_keys_indexes();
+ # 2014-08-11 sgreen@redhat.com - Bug 1012506
+ _update_alias();
+
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
################################################################
@@ -3899,6 +3902,19 @@ sub _fix_user_api_keys_indexes {
}
}
+sub _update_alias {
+ my $dbh = Bugzilla->dbh;
+ return unless $dbh->bz_column_info('bugs', 'alias');
+
+ # We need to move the aliases from the bugs table to the bugs_aliases table
+ $dbh->do(q{
+ INSERT INTO bugs_aliases (bug_id, alias)
+ SELECT bug_id, alias FROM bugs WHERE alias IS NOT NULL
+ });
+
+ $dbh->bz_drop_column('bugs', 'alias');
+}
+
1;
__END__