Bugzilla – Attachment 98505 Details for
Bug 24338
CASH is missing from the default payment_types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24338: (QA follow-up) Make update idempotent
Bug-24338-QA-follow-up-Make-update-idempotent.patch (text/plain), 1.52 KB, created by
Jonathan Druart
on 2020-02-05 15:17:56 UTC
(
hide
)
Description:
Bug 24338: (QA follow-up) Make update idempotent
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-05 15:17:56 UTC
Size:
1.52 KB
patch
obsolete
>From b79592a45ca6f3cc3839098c5f9ed767d698b2e5 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 4 Feb 2020 13:19:18 +0000 >Subject: [PATCH] Bug 24338: (QA follow-up) Make update idempotent > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > installer/data/mysql/atomicupdate/bug_24338.perl | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_24338.perl b/installer/data/mysql/atomicupdate/bug_24338.perl >index bf154169ae..6d0d52b19a 100644 >--- a/installer/data/mysql/atomicupdate/bug_24338.perl >+++ b/installer/data/mysql/atomicupdate/bug_24338.perl >@@ -1,11 +1,15 @@ > $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { >- $dbh->do(qq{ >- INSERT INTO >- authorised_values (category,authorised_value,lib, lib_opac) >- VALUES >- ('PAYMENT_TYPE','CASH','Cash','Cash') >- }); >+ my $exists; >+ eval { $exists = $dbh->do("SELECT 1 FROM authorised_values WHERE category = 'PAYMENT_TYPE' AND authorised_value = 'CASH'"); }; >+ if ( $exists == 0 ) { >+ $dbh->do(qq{ >+ INSERT INTO >+ authorised_values (category,authorised_value,lib, lib_opac) >+ VALUES >+ ('PAYMENT_TYPE','CASH','Cash','Cash') >+ }); >+ } > > SetVersion( $DBversion ); > print "Upgrade to $DBversion done (Bug 24338 - Add 'CASH' to default 'PAYMENT_TYPE')\n"; >-- >2.11.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 24338
:
97972
|
98381
|
98388
|
98412
|
98413
|
98490
|
98491
|
98504
| 98505