Bugzilla – Attachment 151281 Details for
Bug 33297
Typo system preference RetainPatronSearchTerms in DB revs 220600044.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33297: (follow-up) DBRev for existing databases
Bug-33297-follow-up-DBRev-for-existing-databases.patch (text/plain), 2.21 KB, created by
Jonathan Druart
on 2023-05-16 13:47:09 UTC
(
hide
)
Description:
Bug 33297: (follow-up) DBRev for existing databases
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-05-16 13:47:09 UTC
Size:
2.21 KB
patch
obsolete
>From 58c09287d8cbf4eac2b6ea0089f1536990999639 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Tue, 21 Mar 2023 22:30:21 -1000 >Subject: [PATCH] Bug 33297: (follow-up) DBRev for existing databases > >Test plan : >1.1) Start from a Koha 22.05 >1.2) Upgrade to master >=> Check the upgrade says : > Wrong system preference 'RetainPatronSearchTerms' renamed 'RetainPatronsSearchTerms' >2.1) Start from a Koha 22.05 >2.2) Upgrade to 22.11 >2.3) Via interface change system preference 'RetainPatronsSearchTerms' and save >2.4) Upgrade to master >=> Check the upgrade says : > Wrong system preference 'RetainPatronSearchTerms' deleted > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../data/mysql/atomicupdate/bug_33297.pl | 25 +++++++++++++++++++ > 1 file changed, 25 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_33297.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_33297.pl b/installer/data/mysql/atomicupdate/bug_33297.pl >new file mode 100755 >index 00000000000..1f94fcc98bb >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_33297.pl >@@ -0,0 +1,25 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "33297", >+ description => "Fix missing 's' in system preference 'RetainPatronSearchTerms'", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ # Correct preference may have been generated via interface >+ my ($correct_syspref_exists) = $dbh->selectrow_array(q{ >+ SELECT COUNT(*) FROM systempreferences WHERE variable='RetainPatronsSearchTerms' >+ }); >+ if ($correct_syspref_exists) { >+ $dbh->do(q{ >+ DELETE FROM systempreferences WHERE variable='RetainPatronSearchTerms' >+ }); >+ say $out "Wrong system preference 'RetainPatronSearchTerms' deleted"; >+ } else { >+ $dbh->do(q{ >+ UPDATE systempreferences SET variable='RetainPatronsSearchTerms' WHERE variable='RetainPatronSearchTerms' >+ }); >+ say $out "Wrong system preference 'RetainPatronSearchTerms' renamed 'RetainPatronsSearchTerms'"; >+ } >+ }, >+}; >-- >2.25.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 33297
:
148503
|
148504
|
148582
|
148583
|
148584
|
151280
| 151281 |
151282