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.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__