From 3bbc5ca0ecb7d6f86bd4b59827d7f8e098d2bcea Mon Sep 17 00:00:00 2001 From: Joy Nelson Date: Wed, 20 May 2020 14:59:21 +0000 Subject: [PATCH] Bug 24854: DBRev 19.05.11.001 Signed-off-by: Joy Nelson (cherry picked from commit a17ea63d028fe500f80ff75b42a4fa1a511fe708) Signed-off-by: Victor Grousset/tuxayo --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_24854.perl | 16 ---------------- installer/data/mysql/updatedatabase.pl | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 17 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_24854.perl diff --git a/Koha.pm b/Koha.pm index 09611c1234..24ca71384b 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.05.11.000"; +$VERSION = "19.05.11.001"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_24854.perl b/installer/data/mysql/atomicupdate/bug_24854.perl deleted file mode 100644 index f13a11b01c..0000000000 --- a/installer/data/mysql/atomicupdate/bug_24854.perl +++ /dev/null @@ -1,16 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - my $ft_enabled = $dbh->selectrow_array(q| - SELECT COUNT(*) FROM systempreferences WHERE variable like "IDreamBooks%" and value="1" - |); - if ( $ft_enabled ) { - $dbh->do(q| - UPDATE systempreferences - SET value="0" - WHERE variable like "IDreamBooks%" - |); - } - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 24854 - Disable IDreamBooks)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 5c19b26e05..7cebab2f59 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -19067,6 +19067,23 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "19.05.11.001"; +if( CheckVersion( $DBversion ) ) { + my $ft_enabled = $dbh->selectrow_array(q| + SELECT COUNT(*) FROM systempreferences WHERE variable like "IDreamBooks%" and value="1" + |); + if ( $ft_enabled ) { + $dbh->do(q| + UPDATE systempreferences + SET value="0" + WHERE variable like "IDreamBooks%" + |); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 24854 - Disable IDreamBooks)\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5