Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20220825134827_remove_not_null_constraint_for_confidence_columns.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e41d93ebf8b1ebd091c76d83d9717709db651b73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 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