From 834245b70996f842eea08c33c7dd62a8f94ee99d Mon Sep 17 00:00:00 2001 From: Jake Deery Date: Wed, 7 Jun 2023 13:37:09 +0200 Subject: [PATCH] Bug 33720: Update the updatedatabase.pl script to flush caches before running Signed-off-by: Martin Renvoize Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 4391e23ea573bdf4ebec4e5abfc86eb87d504390) Signed-off-by: Martin Renvoize --- installer/data/mysql/updatedatabase.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index c95fdf3e3c..06f98e8e61 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -41,6 +41,7 @@ use C4::Installer; use Koha::Database; use Koha; use Koha::DateUtils qw( dt_from_string output_pref ); +use Koha::Caches; use MARC::Record; use MARC::File::XML ( BinaryEncoding => 'utf8' ); @@ -69,8 +70,11 @@ $|=1; # flushes output local $dbh->{RaiseError} = 0; -# Record the version we are coming from +# Flush memcached before we begin +Koha::Caches->get_instance('config')->flush_all; +Koha::Caches->get_instance('sysprefs')->flush_all; +# Record the version we are coming from my $original_version = C4::Context->preference("Version"); # Deal with virtualshelves -- 2.20.1