Skip to content
Snippets Groups Projects
Verified Commit 4255ad39 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC :two:
Browse files

Add not valid null check constraint for `traversal_ids`

This change introduces a new "not null" check constraint for the
`traversal_ids` column of the `vulnerability_reads` table.

Changelog: added
parent d02cd1e5
1 merge request!147276Add not valid null check constraint for `traversal_ids`
# frozen_string_literal: true
class AddNullCheckConstraintForVulnerabilityReadsTraversalIds < Gitlab::Database::Migration[2.2]
disable_ddl_transaction!
milestone '16.11'
def up
add_not_null_constraint :vulnerability_reads, :traversal_ids, validate: false
end
def down
remove_not_null_constraint :vulnerability_reads, :traversal_ids
end
end
# frozen_string_literal: true
class PrepareAsyncTraversalIdsCheckConstraintValidation < Gitlab::Database::Migration[2.2]
milestone '16.11'
CONSTRAINT_NAME = 'check_f5ba7c2496'
def up
prepare_async_check_constraint_validation :vulnerability_reads, name: CONSTRAINT_NAME
end
def down
unprepare_async_check_constraint_validation :vulnerability_reads, name: CONSTRAINT_NAME
end
end
13de6dff291398df87dc95a81e8d4f7f8ce7a3f22fcb3df39006e0b386d369cf
\ No newline at end of file
45f5f3988b6fac58c19dc5bbe74eedfa1d697746c83493f478600749c25abc46
\ No newline at end of file
......@@ -20556,6 +20556,9 @@ ALTER TABLE sprints
ALTER TABLE web_hook_logs
ADD CONSTRAINT check_df72cb58f5 CHECK ((char_length(url_hash) <= 44)) NOT VALID;
 
ALTER TABLE vulnerability_reads
ADD CONSTRAINT check_f5ba7c2496 CHECK ((traversal_ids IS NOT NULL)) NOT VALID;
ALTER TABLE projects
ADD CONSTRAINT check_fa75869cb1 CHECK ((project_namespace_id IS NOT NULL)) NOT VALID;
 
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment