Bugzilla – Attachment 188765 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: Use Koha::Devel::Files to list dbrevs
Bug-40292-Use-KohaDevelFiles-to-list-dbrevs.patch (text/plain), 2.80 KB, created by
Marcel de Rooy
on 2025-10-31 08:26:18 UTC
(
hide
)
Description:
Bug 40292: Use Koha::Devel::Files to list dbrevs
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-10-31 08:26:18 UTC
Size:
2.80 KB
patch
obsolete
>From 88c22c0dbd52fe74b8842d499095e254874531e4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 17 Oct 2025 12:26:25 +0200 >Subject: [PATCH] Bug 40292: Use Koha::Devel::Files to list dbrevs >Content-Type: text/plain; charset=utf-8 > >For reusability and to limit files to the git index > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Devel/Files.pm | 16 ++++++++++++++++ > xt/check_db_revs_sql_syntax.t | 29 ++++++----------------------- > 2 files changed, 22 insertions(+), 23 deletions(-) > >diff --git a/Koha/Devel/Files.pm b/Koha/Devel/Files.pm >index 5597f0a2ac..ae4152b19a 100644 >--- a/Koha/Devel/Files.pm >+++ b/Koha/Devel/Files.pm >@@ -213,6 +213,22 @@ sub ls_perl_files { > return @files; > } > >+=head2 ls_dbrev_files >+ >+ my @dbrev_files = $file_manager->ls_dbrev_files; >+ >+Lists all dbrevs files. >+ >+=cut >+ >+sub ls_dbrev_files { >+ my ($self) = @_; >+ my $cmd = q{git ls-files installer/data/mysql/db_revs/*.pl}; >+ my @files = qx{$cmd}; >+ chomp for @files; >+ return @files; >+} >+ > =head2 ls_js_files > > my @js_files = $file_manager->ls_js_files(); >diff --git a/xt/check_db_revs_sql_syntax.t b/xt/check_db_revs_sql_syntax.t >index b29b25db30..527a524971 100755 >--- a/xt/check_db_revs_sql_syntax.t >+++ b/xt/check_db_revs_sql_syntax.t >@@ -15,7 +15,7 @@ > # GNU General Public License for more details. > # > # You should have received a copy of the GNU General Public License >-# along with Koha; if not, see <http://www.gnu.org/licenses>. >+# along with Koha; if not, see <https://www.gnu.org/licenses>. > > use Modern::Perl; > >@@ -23,35 +23,18 @@ use Test::More; > use File::Find; > use File::Slurp; > use Test::NoWarnings; >+use Koha::Devel::Files; > > # Test for Bug 40292: Prevent SQL syntax error when upgrading to 25.05 on MariaDB 10.3 > # This test ensures that database revision files don't use SQL syntax that is incompatible > # with older MariaDB versions (specifically MariaDB 10.3) > >-my @db_rev_files; >-my $db_revs_dir = 'installer/data/mysql/db_revs'; >+my $dev_files = Koha::Devel::Files->new; >+my @dbrev_files = $dev_files->ls_dbrev_files; > >-# Skip test if db_revs directory doesn't exist >-if ( !-d $db_revs_dir ) { >- plan skip_all => "Database revisions directory ($db_revs_dir) not found"; >-} >- >-# Find all .pl files in the db_revs directory >-find( >- sub { >- push @db_rev_files, $File::Find::name if /\.pl$/; >- }, >- $db_revs_dir >-); >- >-# Skip test if no database revision files found >-if ( !@db_rev_files ) { >- plan skip_all => "No database revision files found in $db_revs_dir"; >-} >- >-plan tests => scalar @db_rev_files + 1; >+plan tests => scalar @dbrev_files + 1; > >-foreach my $file (@db_rev_files) { >+foreach my $file (@dbrev_files) { > my $content = read_file($file); > > # Check for incompatible RENAME COLUMN syntax >-- >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