Skip to content

Implement `SchemaLock` to prevent breaking the dependent tables

Mehmet Emin INAC requested to merge 349315_implement_model_schema_lock into master

What does this MR do and why?

This MR implements a utility class to lock the schema versions for models and locks the Vulnerability and Vulnerabilities::Finding model schemas.

Related to #349315 (closed).

Why do we need the schema lock?

Data from the vulnerabilities and vulnerability_occurrences tables are being replicated to the vulnerability_reads table to separate the "Read Queries" from "Command Queries" to speed up querying the vulnerabilities therefore we need to make sure that there will be no breaking changes introduced for the vulnerabilities and the vulnerability_occurrences tables.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Mehmet Emin INAC

Merge request reports

Loading