From a12c5a876f41d066cf99ecbcfdf22ca2899cd9b9 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 6 Jul 2022 15:59:33 +0100 Subject: [PATCH] Bug 31110: Move 'ReturnClaim.issue_id' to _should_be_fk This patch moves the issue_id field definition for ReturnClaim in TestBuilder to the list of 'fake' keys in _should_be_fk. Test plan 1) Run t/db_dependent/TestBuilder.t before applying the patch 2) Run t/db_dependent/TestBuilder.t after applying the patch 3) Signoff if the test passes both times. --- t/lib/TestBuilder.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm index 86a793f1b9..7a3365b9e3 100644 --- a/t/lib/TestBuilder.pm +++ b/t/lib/TestBuilder.pm @@ -433,7 +433,9 @@ sub _should_be_fk { # A column is not marked as FK, but a belongs_to relation is defined my ( $source, $column ) = @_; my $inconsistencies = { - 'Item.biblionumber' => 1, #FIXME: Please remove me when I become FK + 'Item.biblionumber' => 1, #FIXME: Please remove me when I become FK + 'ReturnClaim.issue_id' => + 1, #FIXME: Please remove me when we merge issues and old_issues }; return $inconsistencies->{ "$source.$column" }; } @@ -601,10 +603,6 @@ sub _gen_default_values { suggesteddate => dt_from_string()->ymd, STATUS => 'ASKED' }, - ReturnClaim => { - issue_id => undef, # It should be a FK but we removed it - # We don't want to generate a random value - }, ImportItem => { status => 'staged', import_error => undef -- 2.20.1