Bugzilla – Attachment 188762 Details for
Bug 40292
SQL syntax error when upgrading to 25.05 on MariaDB 10.3, RENAME COLUMN unsupported
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40292: Add a specific error if a previous upgrade failed
Bug-40292-Add-a-specific-error-if-a-previous-upgra.patch (text/plain), 1.63 KB, created by
Marcel de Rooy
on 2025-10-31 08:26:12 UTC
(
hide
)
Description:
Bug 40292: Add a specific error if a previous upgrade failed
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-10-31 08:26:12 UTC
Size:
1.63 KB
patch
obsolete
>From 3665ae8c675f7e3ec5b0903369ffb638b4af1157 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 6 Oct 2025 10:20:45 +0200 >Subject: [PATCH] Bug 40292: Add a specific error if a previous upgrade failed >Content-Type: text/plain; charset=utf-8 > >We can reach an inconsistent state if the upgrade DB failed and >new_record_id has been created but renamed. > >I don't think we should try to recover from this state, but have a >specific error message in this case. We will guide people asking for >help. > >Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/db_revs/241200018.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/db_revs/241200018.pl b/installer/data/mysql/db_revs/241200018.pl >index 1c5a438314..1ef9917fa3 100755 >--- a/installer/data/mysql/db_revs/241200018.pl >+++ b/installer/data/mysql/db_revs/241200018.pl >@@ -12,7 +12,9 @@ return { > $sth->execute(); > my $column_info = $sth->fetchrow_hashref(); > >- if ( $column_info && $column_info->{Type} eq 'int(11)' ) { >+ if ( column_exists('additional_field_values', 'new_record_id') ) { >+ die "The database is an inconsistent state, a previous upgrade went wrong. Please try a new upgrade from a previous backup and using a newest version of Koha"; >+ } elsif ( $column_info && $column_info->{Type} eq 'int(11)' ) { > > # Only run the migration if record_id is still an integer type > say_info( $out, "Converting record_id from int(11) to VARCHAR(11)...\n" ); >-- >2.39.5
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 40292
:
183706
|
183747
|
183748
|
183749
|
183750
|
183754
|
183775
|
183777
|
183778
|
183779
|
187428
|
187438
|
187439
|
187440
|
187441
|
187442
|
187443
|
187444
|
187445
|
187446
|
187447
|
188061
|
188758
|
188759
|
188760
|
188761
| 188762 |
188763
|
188764
|
188765