[Koha-bugs] [Bug 25040] Problematic current_timestamp syntax generated by DBIx::Class::Schema::Loader

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Apr 3 13:55:53 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25040

Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #102342|0                           |1
        is obsolete|                            |
 Attachment #102343|0                           |1
        is obsolete|                            |

--- Comment #10 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 102344
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102344&action=edit
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.

You will need Sub::Override (libsub-override-perl) after this patch to
use update_dbix_class_files.

Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list