From cc4c6b2dffb8fa61c12d75f2947c3ff470edbc6e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 6 Feb 2018 10:47:09 -0300 Subject: [PATCH] Bug 20144: [sql_modes] Set default value for biblio.datecreated in tests Should call Koha::Biblio->new instead Fix for: Field 'datecreated' doesn't have a default value t/db_dependent/UsageStats.t Signed-off-by: Josef Moravec Signed-off-by: Julian Maurice --- t/db_dependent/UsageStats.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/UsageStats.t b/t/db_dependent/UsageStats.t index 3be35c38f3..b06dcb1e70 100644 --- a/t/db_dependent/UsageStats.t +++ b/t/db_dependent/UsageStats.t @@ -240,8 +240,8 @@ sub construct_objects_needed { $query = ' INSERT INTO biblio - (title, author) - VALUES (?,?)'; + (title, author, datecreated) + VALUES (?,?, NOW())'; $insert_sth = $dbh->prepare($query); $insert_sth->execute( $title1, $author1 ); my $biblionumber1 = $dbh->last_insert_id( undef, undef, 'biblio', undef ); -- 2.14.2