summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install/DB.pm
diff options
context:
space:
mode:
authorDavid Lawrence <dlawrence@mozilla.com>2011-10-24 22:57:11 +0200
committerDavid Lawrence <dlawrence@mozilla.com>2011-10-24 22:57:11 +0200
commit3fa19c4c0f396ffe3a048ce6cbbd04c6e8bca6d0 (patch)
treec75bdc1df36d7bcd5865de32678b2fb015287b1b /Bugzilla/Install/DB.pm
parentb2af914ec824e3c7b3773c0ffd9d9a7e08290caf (diff)
parentd47f6057e0257b3282ff25a144b9ef36ec741012 (diff)
downloadbugzilla-3fa19c4c0f396ffe3a048ce6cbbd04c6e8bca6d0.tar.gz
bugzilla-3fa19c4c0f396ffe3a048ce6cbbd04c6e8bca6d0.tar.xz
merged with bugzilla/4.2
Diffstat (limited to 'Bugzilla/Install/DB.pm')
-rw-r--r--Bugzilla/Install/DB.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index cdd4f8e96..e8304cfbb 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -656,6 +656,9 @@ sub update_table_definitions {
# 2011-06-15 dkl@mozilla.com - Bug 658929
_migrate_disabledtext_boolean();
+ # 2011-10-11 miketosh - Bug 690173
+ _on_delete_set_null_for_audit_log_userid();
+
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
################################################################
@@ -3607,6 +3610,15 @@ sub _rename_tags_to_tag {
}
}
+sub _on_delete_set_null_for_audit_log_userid {
+ my $dbh = Bugzilla->dbh;
+ my $fk = $dbh->bz_fk_info('audit_log', 'user_id');
+ if ($fk and !defined $fk->{DELETE}) {
+ $fk->{DELETE} = 'SET NULL';
+ $dbh->bz_alter_fk('audit_log', 'user_id', $fk);
+ }
+}
+
1;
__END__