X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=t%2Fdb_dependent%2FUsageStats.t;h=2b3316598501a2f7251d6ef4a96b010b125f4195;hb=03a547da32195aa98cd9cd28b8d64f7bc399fa02;hp=430a698e3dee23bf95b5af2eaaac105fcb95ce95;hpb=db181fd8e15df0309898e3c6b62ed6446a68d526;p=koha.git diff --git a/t/db_dependent/UsageStats.t b/t/db_dependent/UsageStats.t index 430a698e3d..2b33165985 100644 --- a/t/db_dependent/UsageStats.t +++ b/t/db_dependent/UsageStats.t @@ -286,16 +286,16 @@ sub construct_objects_needed { (authtypecode, marcxml) VALUES (?, "")'; $insert_sth = $dbh->prepare($query); - $insert_sth->execute('authtypecode1'); + $insert_sth->execute('atc1'); my $authid1 = $dbh->last_insert_id( undef, undef, 'auth_header', undef ); - $insert_sth->execute('authtypecode2'); + $insert_sth->execute('atc2'); my $authid2 = $dbh->last_insert_id( undef, undef, 'auth_header', undef ); # ---------- 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 );