debian-mirror-gitlab/db/migrate/20220825134827_remove_not_null_constraint_for_confidence_columns.rb
2022-10-11 01:57:18 +05:30

16 lines
462 B
Ruby

# frozen_string_literal: true
class RemoveNotNullConstraintForConfidenceColumns < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
def up
change_column_null :vulnerabilities, :confidence, true
change_column_null :vulnerability_occurrences, :confidence, true
change_column_null :security_findings, :confidence, true
end
def down
# no-op: We can not set `NOT NULL` constraint here as there can be NULL values already.
end
end