]> git.koha-community.org Git - koha.git/commit
Bug 25040: monkeypatch Schema::Loader for recent MariaDB
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 3 Apr 2020 10:16:39 +0000 (11:16 +0100)
committerJoy Nelson <joy@bywatersolutions.com>
Mon, 4 May 2020 21:22:30 +0000 (21:22 +0000)
commit68588e017595de632b0bd4dd03f8e05c43fa240e
tree810a8f212ceefa906a497a0715d995bf06045736
parentb216f20dd684c80663567b17f9005e79e113abb2
Bug 25040: monkeypatch Schema::Loader for recent MariaDB

Recent versions of MariaDB changed the output of 'DESCRIBE' for
timestamp columns with defaults from `CURRENT_TIMESTAMP` to
`current_timestamp()`.  As such the code inside
DBIx::Class::Schema::Loader which catches such cases and outputs
`\"current_timestamp"` as a sensible cross platform default is missed
and this leads of inconsistent class files and bugs with out default
lookup code in Koha::Objects.

This patch serves as a backport of the code I have submitted upstream
such that out developers can continue to use update_dbix_class_files.pl
to build their schema classes from the database and regardless of their
db server version get a consistently correct output.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Koha/Schema/Loader/mysql.pm [new file with mode: 0644]
misc/devel/update_dbix_class_files.pl