Commit cdb704ec authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '346592-validate-not-null-constraint-on-security_findings-uuid' into 'master'

Validate NOT NULL on security_findings.uuid column

See merge request gitlab-org/gitlab!80912
parents 632a455d e0e96868
# frozen_string_literal: true
class ValidateNotNullConstraintOnSecurityFindingsUuid < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
def up
validate_not_null_constraint(:security_findings, :uuid)
end
def down
# no-op
end
end
3223f741799216ee6afb4daafbcebfa09bd722d461dd4d64fcbda7d8700ae235
\ No newline at end of file
......@@ -19591,6 +19591,7 @@ CREATE TABLE security_findings (
deduplicated boolean DEFAULT false NOT NULL,
uuid uuid,
overridden_uuid uuid,
CONSTRAINT check_6c2851a8c9 CHECK ((uuid IS NOT NULL)),
CONSTRAINT check_b9508c6df8 CHECK ((char_length(project_fingerprint) <= 40))
);
......@@ -23110,9 +23111,6 @@ ALTER TABLE ONLY chat_teams
ALTER TABLE vulnerability_scanners
ADD CONSTRAINT check_37608c9db5 CHECK ((char_length(vendor) <= 255)) NOT VALID;
ALTER TABLE security_findings
ADD CONSTRAINT check_6c2851a8c9 CHECK ((uuid IS NOT NULL)) NOT VALID;
ALTER TABLE sprints
ADD CONSTRAINT check_ccd8a1eae0 CHECK ((start_date IS NOT NULL)) NOT VALID;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment