Add dependency_management_remediations table
What does this MR do and why?
Adds dependency_management_remediations (gitlab_sec), recording the last known auto-remediation state for a dependency in a project manifest.
Today the only record that a maintainer dismissed a bump is the closed merge request itself, so deleting it brings the bump back on the next pipeline. A row keyed on the dependency's location survives that, and lets a monorepo tell the same dependency apart in two manifests.
Keyed on (project_id, purl_type, package_name, input_file_path, current_version). The installed version is part of the identity because some ecosystems (npm) allow the same package installed at several versions in one manifest, each remediated on its own. merge_request_id is a loose FK with async_nullify rather than async_delete, since the row has to outlive the merge request. input_file_path is NOT NULL DEFAULT '' because Postgres treats NULLs as distinct in a unique index.
Nothing reads or writes the table yet.
Two points differ from the schema in the issue description, both from later analysis:
stateisopen, dismissed, merged.supersededis unreachable with one row per location.dismissed_atis a reader returningupdated_atonly while dismissed, rather thanalias_attribute, which would report a value for open and merged rows too.
References
Related to #603968
Schema discussion: #603968 (comment 3630480470)
How to set up and validate locally
bundle exec rails db:migrate
bundle exec rails db:migrate:down:sec VERSION=20260826164021MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.