Bugzilla – Attachment 188763 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: Rename new_record_id if exists
Bug-40292-Rename-newrecordid-if-exists.patch (text/plain), 1.52 KB, created by
Marcel de Rooy
on 2025-10-31 08:26:14 UTC
(
hide
)
Description:
Bug 40292: Rename new_record_id if exists
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-10-31 08:26:14 UTC
Size:
1.52 KB
patch
obsolete
>From 49ca83a313f416c8f041f49e402c26a5c7221124 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 6 Oct 2025 10:30:08 +0200 >Subject: [PATCH] Bug 40292: Rename new_record_id if exists >Content-Type: text/plain; charset=utf-8 > >If some installs didn't notice the column was missing (not renamed) we >can still do it now. > >Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../data/mysql/atomicupdate/bug_40292.pl | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_40292.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_40292.pl b/installer/data/mysql/atomicupdate/bug_40292.pl >new file mode 100755 >index 0000000000..e6a7e54bd3 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_40292.pl >@@ -0,0 +1,19 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "40292", >+ description => "Rename new_record_id if exists", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ if ( column_exists('additional_field_values', 'new_record_id') ) { >+ $dbh->do( >+ q{ ALTER TABLE additional_field_values CHANGE COLUMN new_record_id record_id VARCHAR(11) NOT NULL DEFAULT '' COMMENT 'record_id'; } >+ ); >+ >+ say_success( $out, "Renamed new_record_id to record_id" ); >+ } >+ }, >+}; >-- >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