Bugzilla – Attachment 163968 Details for
Bug 35610
Missing FK on old_reserves.branchcode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35610: (QA follow-up): tidy up code
Bug-35610-QA-follow-up-tidy-up-code.patch (text/plain), 1.61 KB, created by
Victor Grousset/tuxayo
on 2024-03-27 01:37:03 UTC
(
hide
)
Description:
Bug 35610: (QA follow-up): tidy up code
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2024-03-27 01:37:03 UTC
Size:
1.61 KB
patch
obsolete
>From e68c576aaf6c5c8e04770fc3e2098095dd7adb2b Mon Sep 17 00:00:00 2001 >From: Victor Grousset/tuxayo <victor@tuxayo.net> >Date: Wed, 27 Mar 2024 02:35:39 +0100 >Subject: [PATCH] Bug 35610: (QA follow-up): tidy up code > >--- > installer/data/mysql/atomicupdate/bug_35610.pl | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_35610.pl b/installer/data/mysql/atomicupdate/bug_35610.pl >index 6143bd9e11..753adce25e 100755 >--- a/installer/data/mysql/atomicupdate/bug_35610.pl >+++ b/installer/data/mysql/atomicupdate/bug_35610.pl >@@ -7,18 +7,22 @@ return { > my ($args) = @_; > my ( $dbh, $out ) = @$args{qw(dbh out)}; > >- unless ( foreign_key_exists('old_reserves', 'old_reserves_ibfk_branchcode') ) { >- $dbh->do(q{ >+ unless ( foreign_key_exists( 'old_reserves', 'old_reserves_ibfk_branchcode' ) ) { >+ $dbh->do( >+ q{ > UPDATE old_reserves > SET branchcode = NULL > WHERE branchcode NOT IN (SELECT branchcode FROM branches) >- }); >+ } >+ ); > >- $dbh->do(q{ >+ $dbh->do( >+ q{ > ALTER TABLE old_reserves > ADD CONSTRAINT `old_reserves_ibfk_branchcode` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE; >- }); >- say $out "Added foreign key on 'old_reserves.branchcode'" >+ } >+ ); >+ say $out "Added foreign key on 'old_reserves.branchcode'"; > } > }, > }; >-- >2.44.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35610
:
160097
|
160098
|
161540
|
163827
|
163966
|
163967
| 163968