Bug 20144: [sql_modes] Set default value for biblio.datecreated in tests
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 6 Feb 2018 16:27:32 +0000 (13:27 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 13 Feb 2018 16:58:59 +0000 (13:58 -0300)
Fix for:
Field 'datecreated' doesn't have a default value

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/db_dependent/Creators/Lib.t

index 749c6a7..248c4e7 100644 (file)
@@ -148,8 +148,8 @@ my $author3 = 'Author 3';
 
 $query = '
   INSERT INTO biblio
-    (title, author)
-  VALUES (?,?)';
+    (title, author, datecreated)
+  VALUES (?,?, NOW())';
 $insert_sth = $dbh->prepare($query);
 $insert_sth->execute( $title1, $author1 );
 $insert_sth->execute( $title2, undef );