From 122945827d6d958e533b913e10f47c13e3c34f65 Mon Sep 17 00:00:00 2001 From: Joy Nelson Date: Thu, 6 Feb 2020 21:33:28 +0000 Subject: [PATCH] Bug 24338: DBREV 19.11.02.002 Signed-off-by: Joy Nelson --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_24338.perl | 16 ---------------- installer/data/mysql/updatedatabase.pl | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_24338.perl diff --git a/Koha.pm b/Koha.pm index 624bdcc825..ba889b912e 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "19.11.02.001"; +$VERSION = "19.11.02.002"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_24338.perl b/installer/data/mysql/atomicupdate/bug_24338.perl deleted file mode 100644 index 6d0d52b19a..0000000000 --- a/installer/data/mysql/atomicupdate/bug_24338.perl +++ /dev/null @@ -1,16 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - 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"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 34e310d956..3ab89d77b6 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -20281,6 +20281,22 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 24206 - Update OpacSearchForTitleIn system preference)\n"; } +$DBversion = '19.11.02.002'; +if( CheckVersion( $DBversion ) ) { + 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"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.5