[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:57:45 CEST 2020


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

--- Comment #12 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Martin Renvoize from comment #9)
> Testplan:
> 
> 0/ Prior to applying this patchset run the update_dbix_class_files.pl script
> against a very new version of MariaDB - Note that \"current_timestamp2 will
> get replaced by "current_timestamp()" in the schema classes
> 1/ Apply the patch and install Sub::Override
> 2/ Run update_dbix_class_files.pl and note that we now stick to
> \"current_timestamp"

Note that is not enough for me, I had to modify the structure of a table to
make sure the file would have been generated.
For instance with patches from bug 24161, that modifies aqorders, 

@ Koha/Schema/Result/Aqorder.pm:362 @ __PACKAGE__->add_columns(
   {
     data_type => "timestamp",
     datetime_undef_if_invalid => 1,
-    default_value => "current_timestamp()",
+    default_value => \"current_timestamp",
     is_nullable => 0,
   },

See also commit message from comment 1.

Thanks Martin!

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


More information about the Koha-bugs mailing list