Skip to content

Add expression and requirement type columns to compliance requirements table

Description

  1. We've want to add the ability to define internal checks and external checks. A proposal is drafted in gitlab-com/content-sites/handbook!8193 (merged).
  2. We also need to store results of these checks only for the projects that have these checks defined, therefore, we'll be creating a new database table named project_compliance_configuration_status for storing results for these requirements.

Proposal

  1. To allow us to go in that state we need the following columns to be added inside the compliance_requirements table.
  2. We would drop the compliance_checks table as we would only use compliance_requirements table.
Column Type
requirement_type smallint
expression jsonb
  1. Also create project_compliance_configuration_status table with the following schema
Column Type
id bigint
created_at timestamp
updated_at timestamp
project_id bigint
namespace_id bigint
compliance_requirement_id bigint
status smallint
Edited by Huzaifa Iftikhar