Bugzilla – Attachment 171050 Details for
Bug 34088
Schema upgrade should short circuit faster if no upgrade needs to be done
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34088: Move the 'needs update' test to a separate script
Bug-34088-Move-the-needs-update-test-to-a-separate.patch (text/plain), 1.81 KB, created by
Jonathan Druart
on 2024-09-05 10:03:31 UTC
(
hide
)
Description:
Bug 34088: Move the 'needs update' test to a separate script
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-09-05 10:03:31 UTC
Size:
1.81 KB
patch
obsolete
>From 97290c4f351fa557a0c88bdb38e627720dd902e0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 5 Sep 2024 12:03:09 +0200 >Subject: [PATCH] Bug 34088: Move the 'needs update' test to a separate script > >--- > debian/scripts/koha-upgrade-schema | 2 +- > installer/data/mysql/needs_update.pl | 6 ++++++ > installer/data/mysql/updatedatabase.pl | 7 ------- > 3 files changed, 7 insertions(+), 8 deletions(-) > create mode 100755 installer/data/mysql/needs_update.pl > >diff --git a/debian/scripts/koha-upgrade-schema b/debian/scripts/koha-upgrade-schema >index da50d41f107..14ad1cd73dd 100755 >--- a/debian/scripts/koha-upgrade-schema >+++ b/debian/scripts/koha-upgrade-schema >@@ -43,7 +43,7 @@ do > echo "Upgrading database schema for $name" > KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \ > PERL5LIB=$PERL5LIB \ >- "$CGI_PATH/installer/data/mysql/updatedatabase.pl" >+ "$CGI_PATH/installer/data/mysql/needs_update.pl" && "$CGI_PATH/installer/data/mysql/updatedatabase.pl" > else > die "Error: Invalid instance name $name" > fi >diff --git a/installer/data/mysql/needs_update.pl b/installer/data/mysql/needs_update.pl >new file mode 100755 >index 00000000000..ada3a3c3e1b >--- /dev/null >+++ b/installer/data/mysql/needs_update.pl >@@ -0,0 +1,6 @@ >+#!/usr/bin/perl >+ >+use Modern::Perl; >+ >+use Koha::Installer; >+exit !Koha::Installer->needs_update; >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 4bedcb16116..3ce6a4ccca6 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -29,13 +29,6 @@ > > use Modern::Perl; > >-BEGIN { >- use Koha::Installer; >- if ( !Koha::Installer->needs_update ) { >- exit; >- } >-} >- > use feature 'say'; > > # CPAN modules >-- >2.34.1
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 34088
:
152543
|
152995
|
152996
|
152997
|
152998
|
154230
|
170554
|
170555
| 171050 |
174441
|
174443