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 <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2018-02-06 10:47:09 -03:00
parent 23018e1512
commit a2292e83f1
1 changed files with 2 additions and 2 deletions

View File

@ -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 );