https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25040
Bug ID: 25040
Summary: Problematic current_timestamp syntax generated by
DBIx::Class::Schema::Loader
Change sponsored?: ---
Product: Koha
Version: unspecified
Hardware: All
OS: All
Status: ASSIGNED
Severity: major
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Caught by the changes made to Koha::Object->store by bug 23463 (especially
9c383aa286fee5a29c6f084873f2eb6644bad64f)
154 elsif ( not defined $self->$col
155 && $columns_info->{$col}->{datetime_undef_if_invalid} )
156 {
157 # timestamp
158 $self->_result()->set_column($col =>
$columns_info->{$col}->{default_value});
159 }
If a timestamp not null column does not have a value when store is called, the
default value is set.
The expected default value is \"current_timestamp"(`git grep current_timestamp
Koha/Schema/Result`) but for some reasons DBIx::Class::Schema::Loader sometimes
generates "current_timestamp()" (certainly depending on versions of
DBIx::Class::Schema::Loader and DBMS MySQL vs MariaDB)
It ends up with an error on insert/update:
DBD::mysql::st execute failed: Incorrect datetime value: 'current_timestamp()'
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/