Transition sbom_occurrences to loose foreign keys
Proposal
Once we have support for a dedicated sec DB we need to transition the first phase models (sbom_*
) to loose foreign keys to allow us to replicate the tables to the new DB and switchover seamlessly
Implementation Plan
-
Update base class for Sbom::Occurrence
to rely onGitlab::Database::SecApplicationRecord
-
Update db/docs/TABLE_NAME.yml
to point to newgitlab_sec
schema -
If table references tables beyond the sec DB boundary (i.e. ✅ projects,❌ sbom_*), use thegenerate-loose-foreign-key
script to decompose foreign keys for target table -
do while verifying behavior
Edited by Lucas Charles