Bugzilla – Attachment 187439 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.48 KB, created by
Jonathan Druart
on 2025-10-06 08:31:52 UTC
(
hide
)
Description:
Bug 40292: Add a specific error if a previous upgrade failed
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-10-06 08:31:52 UTC
Size:
1.48 KB
patch
obsolete
>From d83fa3f2daa639ef537ce8b713ff88637e0ddb74 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 > >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. >--- > 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 1c5a4383149..1ef9917fa39 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.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 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