Bugzilla – Attachment 148504 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.08 KB, created by
Fridolin Somers
on 2023-03-22 08:35:31 UTC
(
hide
)
Description:
Bug 33297: (follow-up) DBRev for existing databases
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2023-03-22 08:35:31 UTC
Size:
2.08 KB
patch
obsolete
>From 807cb3922b0e60ed777d2e827cc0a109d9ead714 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 >--- > .../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 0000000000..1f94fcc98b >--- /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.39.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 33297
:
148503
|
148504
|
148582
|
148583
|
148584
|
151280
|
151281
|
151282