Backfill security_policy_id in compliance_framework_security_policies
What does this MR do and why?
Currently, when a policy is scoped with a compliance framework, we store the policy reference (by policy index in YAML file) and the framework in compliance_framework_security_policies. Now with the security policy read model (&13865) we store the policy in security_policies table.
As a part of Use security policy read model for compliance f... (#481786 - closed), we want to use the read model to link the reference between a security policy and the framework. The issue will have 4 MRs:
This MR introduces a background migration to backfill security_policy_id to old rows
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR 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.