]> git.koha-community.org Git - koha.git/commit
Bug 23463: Fix timestamp default value
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 27 Jan 2020 15:54:20 +0000 (16:54 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 23 Mar 2020 09:26:33 +0000 (09:26 +0000)
commitf70a738bca1782e7a90ef217473c2d50e335e3e4
treeec1f06281081fa4c8c72ae0856472cad9fcc5988
parentcc6f25fec44273ed1407c910544af04c4700817e
Bug 23463: Fix timestamp default value

This sounds wrong as we should let the DBMS do that, but it was failing.
Here we are doing the same as Koha::Patron->store for dateenrolled

To recreate the failure, prove t/db_dependent/Koha/Item.t without this
patch:
DBD::mysql::st execute failed: Column 'timestamp' cannot be null [for
Statement "UPDATE `items` SET `more_subfields_xml` = ?, `timestamp` = ?
WHERE ( `itemnumber` = ? )" with ParamValues: 0='<?xml version="1.0"
encoding="UTF-8"?>

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Item.pm