Fix loose foreign key spec to use right connection
What does this MR do and why?
Similar to what we did in
!75511 (merged) we need to
ensure the right connection is being used around anywhere we interact
with the LooseForeignKeys::DeletedRecord
table. This is because in our long term decomposed architecture this table will live in both the main
and ci
databases. As part of preparing for the decomposed architecture we discovered that this test fails when you use a different datbase for ci
and main
in !78182 (merged). This spec was
failing when using 2 databases because the it was choosing the
wrong database to load the LooseForeignKeys::DeletedRecord
from and
this meant that it did not find anything.
Screenshots or screen recordings
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.