Bug 20144: [sql_modes] Set correct value for old_issues.issue_id in tests
Fix for: Column 'issue_id' cannot be null 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:
parent
d43eb8b19c
commit
61679027b5
|
|
@ -294,8 +294,8 @@ sub construct_objects_needed {
|
|||
# ---------- Add 1 old_issues
|
||||
$query = '
|
||||
INSERT INTO old_issues
|
||||
(borrowernumber, branchcode, itemnumber)
|
||||
VALUES (?,?,?)';
|
||||
(issue_id, borrowernumber, branchcode, itemnumber)
|
||||
VALUES ((select coalesce(max(issue_id), 0)+1 from issues),?,?,?)';
|
||||
$insert_sth = $dbh->prepare($query);
|
||||
$insert_sth->execute( $borrowernumber1, $branchcode, $item_number1 );
|
||||
my $issue_id1 = $dbh->last_insert_id( undef, undef, 'old_issues', undef );
|
||||
|
|
|
|||
Loading…
Reference in New Issue