@@ -, +, @@
Status: 500
Content-type: text/html
Software error:
---
Koha.pm | 2 +-
installer/data/mysql/updatedatabase.pl | 36 +++++++++++++++++--
.../prog/en/modules/installer/step3.tt | 2 +-
3 files changed, 36 insertions(+), 4 deletions(-)
--- a/Koha.pm
+++ a/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 = "20.12.00.005";
+$VERSION = "20.12.00.006";
sub version {
return $VERSION;
--- a/installer/data/mysql/updatedatabase.pl
+++ a/installer/data/mysql/updatedatabase.pl
@@ -47,6 +47,8 @@ use MARC::File::XML ( BinaryEncoding => 'utf8' );
use File::Path qw[remove_tree]; # perl core module
use File::Slurp;
+use Try::Tiny;
+
# FIXME - The user might be installing a new database, so can't rely
# on /etc/koha.conf anyway.
@@ -23451,8 +23453,38 @@ if( CheckVersion( $DBversion ) ) {
$DBversion = '20.12.00.005';
if( CheckVersion( $DBversion ) ) {
- $dbh->do(q{UPDATE systempreferences set variable="OPACLanguages" WHERE variable="opaclanguages"});
- NewVersion( $DBversion, 27491, "Rename system preference 'opaclanguages' to 'OPACLanguages'");
+ execute_entry(
+ $DBversion, 27491, "Rename system preference 'opaclanguages' to 'OPACLanguages'",
+ sub {
+ $dbh->do(
+ q{UPDATE systempreferences set variable="OPACLanguages" WHERE variable="opaclanguages"}
+ );
+ }
+ );
+}
+
+$DBversion = '20.12.00.006';
+if( CheckVersion( $DBversion ) ) {
+ execute_entry( $DBversion, 12345, "Testing failure",
+ sub {
+ $dbh->do(
+ q{ALTER TABLE foo}
+ );
+ }
+ );
+}
+
+
+sub execute_entry {
+ my ( $DBversion, $bug_number, $description, $sub ) = @_;
+
+ try {
+ Koha::Database->schema->txn_do($sub);
+ } catch {
+ die sprintf "Something wrong happened during %s (%s):\n%s", $DBversion, $description, $_;
+ };
+
+ NewVersion( $DBversion, $bug_number, $description );
}
# SEE bug 13068
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt
@@ -249,7 +249,7 @@
[% IF ( updatestructure ) %]
Updating database structure
[% IF ( has_update_succeeds ) %]
- Update report :
+ Update report:
[% FOREACH l IN update_report %]
[% SET line = l.line %]
--