Add organization ID to LFK deleted records

What does this MR do and why?

Add organization ID to LFK deleted records

Load sharding key data into DB at application startup

Update trigger to resolve organization ID when inserting into loose_foreign_keys_deleted_records

How to set up and validate locally

  1. Download and set up fresh database. Start the app at least once.
  2. Insert a row into any table that uses loose foreign keys AND has a sharding key defined.
  3. Delete the row inserted above.
  4. Observe the new row in loose_foreign_keys_deleted_records

Related to #535508

Edited by Jon Jenkins

Merge request reports

Loading