Ignore fingerprint column on sbom_sources
What does this MR do and why?
Describe in detail what your merge request does and why.
The fingerprint column was something that we thought we would need when doing early database design, but in practice we have realized that it's not necessary. This change begins the process of removing it by:
- Removing the NOT NULL constraint on the column
- Removing any code which populates the fingerprint
- Ignoring the column on the model
Note: On production this table is currently empty. It will begin being populated when !96575 (merged) is merged.
Migrations
$ scripts/db_tasks db:migrate:down VERSION=20220914174705
main: == 20220914174705 RemoveNotNullConstraintFromSbomSourceFingerprint: reverting =
main: -- change_column_null(:sbom_sources, :fingerprint, false)
main: -> 0.0014s
main: == 20220914174705 RemoveNotNullConstraintFromSbomSourceFingerprint: reverted (0.0051s)
$ scripts/db_tasks db:migrate
main: == 20220914174705 RemoveNotNullConstraintFromSbomSourceFingerprint: migrating =
main: -- change_column_null(:sbom_sources, :fingerprint, true)
main: -> 0.0017s
main: == 20220914174705 RemoveNotNullConstraintFromSbomSourceFingerprint: migrated (0.0025s)
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
N/A: No user-facing changes.
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.
Edited by Brian Williams