From 16b243c49b0c8f5c1491db094280742afb79903d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 5 Feb 2018 18:19:53 -0300 Subject: [PATCH] Bug 20144: [sql_modes] Set import_records.marcxml_old to '' on INSERT Fix for: Field 'marcxml_old' doesn't have a default value t/db_dependent/ImportBatch.t Fixme - need to update existing DB? Signed-off-by: Josef Moravec Signed-off-by: Julian Maurice --- C4/ImportBatch.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index 1b74929c18..3727f4152d 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -1595,10 +1595,10 @@ sub _create_import_record { my ($batch_id, $record_sequence, $marc_record, $record_type, $encoding, $z3950random, $marc_type) = @_; my $dbh = C4::Context->dbh; - my $sth = $dbh->prepare("INSERT INTO import_records (import_batch_id, record_sequence, marc, marcxml, + my $sth = $dbh->prepare("INSERT INTO import_records (import_batch_id, record_sequence, marc, marcxml, marcxml_old, record_type, encoding, z3950random) - VALUES (?, ?, ?, ?, ?, ?, ?)"); - $sth->execute($batch_id, $record_sequence, $marc_record->as_usmarc(), $marc_record->as_xml($marc_type), + VALUES (?, ?, ?, ?, ?, ?, ?, ?)"); + $sth->execute($batch_id, $record_sequence, $marc_record->as_usmarc(), $marc_record->as_xml($marc_type), '', $record_type, $encoding, $z3950random); my $import_record_id = $dbh->{'mysql_insertid'}; $sth->finish(); -- 2.14.2