Refactor ComplianceFramework::FRAMEWORKS to ActiveRecord Model

This is one of the issues required to implement #231247 (closed) entirely.

Problem to solve

Currently, a project can have a compliance framework set in the form of ComplianceManagement::ComplianceFramework::ProjectSetting being associated to a Project.

The framework attribute on this object is a hard-coded set of common compliance frameworks defined in ComplianceManagement::ComplianceFramework::FRAMEWORKS.

To achieve the outcome in this issue, we need to refactor the backend to allow the ability for custom frameworks to be added. This needs to be backwards-compatible and not affect existing projects which may already have one of these pre-defined compliance frameworks associated with it.

Proposal

  1. Create a new ActiveRecord model to represent the custom "compliance framework labels" that will be created at the "root group" level.
  2. For each root group, create one "compliance framework label" record for each unique label name used by that group's projects (so there would be no more than 5 records created for each root group, because there were only 5 default labels).
  3. Replace the project_compliance_framework_settings.framework enum values with a foreign key relation to the newly-created "compliance framework label" record.

Note: This lays the foundation for the ability to create/update/delete labels, which will be implemented under #231247 (closed).

Edited by Dan Jensen