Skip to content

Create ComplianceManagement::Framework model

Max Woolf requested to merge 251113-create_framework_model into master

What does this MR do?

  • Creates a new model ComplianceManagement::Framework which represents a compliance management framework (such a GDPR, or SOC2)
  • Data migration happens in the next MR.

database review

Migrate

== 20200922075244 AddComplianceFrameworkModel: migrating ======================
-- table_exists?(:compliance_management_frameworks)
   -> 0.0004s
-- create_table(:compliance_management_frameworks)
   -> 0.0270s
-- transaction_open?()
   -> 0.0000s
-- current_schema()
   -> 0.0002s
-- execute("ALTER TABLE compliance_management_frameworks\nADD CONSTRAINT check_ab00bc2193\nCHECK ( char_length(name) <= 255 )\nNOT VALID;\n")
   -> 0.0004s
-- current_schema()
   -> 0.0003s
-- execute("SET statement_timeout TO 0")
   -> 0.0001s
-- execute("ALTER TABLE compliance_management_frameworks VALIDATE CONSTRAINT check_ab00bc2193;")
   -> 0.0008s
-- execute("RESET ALL")
   -> 0.0002s
-- transaction_open?()
   -> 0.0000s
-- current_schema()
   -> 0.0002s
-- execute("ALTER TABLE compliance_management_frameworks\nADD CONSTRAINT check_1617e0b87e\nCHECK ( char_length(description) <= 255 )\nNOT VALID;\n")
   -> 0.0004s
-- current_schema()
   -> 0.0002s
-- execute("ALTER TABLE compliance_management_frameworks VALIDATE CONSTRAINT check_1617e0b87e;")
   -> 0.0008s
-- transaction_open?()
   -> 0.0000s
-- current_schema()
   -> 0.0001s
-- execute("ALTER TABLE compliance_management_frameworks\nADD CONSTRAINT check_08cd34b2c2\nCHECK ( char_length(color) <= 10 )\nNOT VALID;\n")
   -> 0.0003s
-- current_schema()
   -> 0.0001s
-- execute("ALTER TABLE compliance_management_frameworks VALIDATE CONSTRAINT check_08cd34b2c2;")
   -> 0.0008s
== 20200922075244 AddComplianceFrameworkModel: migrated (0.0580s) =============

Rollback

== 20200922075244 AddComplianceFrameworkModel: reverting ======================
-- drop_table(:compliance_management_frameworks, {:force=>:cascade})
   -> 0.0055s
== 20200922075244 AddComplianceFrameworkModel: reverted (0.0056s) =============

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Mentions #251113 (closed)

Edited by Adam Hegyi

Merge request reports