Add Internal ID to Attestation DB
Adding internal_id support to attestations will ensure IDs for view related paths are scoped to the project and can be referenced more easily by other project features when necessary.
The scope of this issue is to add internal_id support to the database and model so that it can be used in the show and download routes.
Implementation proposal
- Create migration to:
- add
iidcolumn toslsa_attestationstable - create unique index on (project_id, iid)
- add
- Update
SupplyChain::Attestationwith:include AtomicInternalIdhas_internal_id :iid, scope: :project
- Add model specs—see
it_behaves_like 'AtomicInternalId'for examples
Edited by Aaron Huntsman