Skip to content

Add `gitlab:db:lock_writes` a trigger to prevent writes due to gitlab_schema

Kamil Trzciński requested to merge install-prevent-writes-trigger into master

What does this MR do and why?

Proof of concept usage of triggers to prevent writes outside of schema. Useful in context of the gitlab-com/gl-infra&693 (comment 879857950).

This does iterate all known tables on each database and creates or drops a trigger to prevent new INSERTs, UPDATEs, DELETEs or TRUNCATEs.

Related Issue: #361603 (closed)

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 Omar Qunsul

Merge request reports