Bugzilla – Attachment 138006 Details for
Bug 31086
Do not allow hold requests with no branchcode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31086: (QA follow-up) Improve atomicupdate to be more resilient
Bug-31086-QA-follow-up-Improve-atomicupdate-to-be-.patch (text/plain), 1.64 KB, created by
Martin Renvoize (ashimema)
on 2022-07-22 09:07:18 UTC
(
hide
)
Description:
Bug 31086: (QA follow-up) Improve atomicupdate to be more resilient
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-07-22 09:07:18 UTC
Size:
1.64 KB
patch
obsolete
>From 4dbca9d759983a24cd46c53bfa7f567c545858d3 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 22 Jul 2022 10:05:55 +0100 >Subject: [PATCH] Bug 31086: (QA follow-up) Improve atomicupdate to be more > resilient > >We now populate the branchcode field with the first available branch on >the system if we find it to be NULL before we set the NOT NULL >--- > .../bug_31086_do_not_allow_null_branchcode_in_reserves.pl | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/installer/data/mysql/atomicupdate/bug_31086_do_not_allow_null_branchcode_in_reserves.pl b/installer/data/mysql/atomicupdate/bug_31086_do_not_allow_null_branchcode_in_reserves.pl >index 1c817a2f26..ea2c1a6eb4 100755 >--- a/installer/data/mysql/atomicupdate/bug_31086_do_not_allow_null_branchcode_in_reserves.pl >+++ b/installer/data/mysql/atomicupdate/bug_31086_do_not_allow_null_branchcode_in_reserves.pl >@@ -6,10 +6,18 @@ return { > up => sub { > my ($args) = @_; > my ($dbh, $out) = @$args{qw(dbh out)}; >+ >+ # Ensure we have no NULL's in the branchcode field >+ $dbh->do(q{ >+ UPDATE reserves SET branchcode = ( SELECT branchcode FROM branches LIMIT 1) WHERE branchode IS NULL; >+ }); >+ >+ # Set the NOT NULL configuration > $dbh->do(q{ > ALTER TABLE reserves > MODIFY COLUMN `branchcode` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at' > }); >+ > # Print useful stuff here > say $out "Removed NULL option from branchcode for reserves"; > }, >-- >2.20.1
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 31086
:
136983
|
136984
|
136986
|
136987
|
137026
|
137254
|
137255
|
137256
|
137257
|
137258
|
137635
|
137636
|
137637
|
137638
|
137639
|
137640
|
137641
|
137642
| 138006 |
138018
|
138051
|
144824