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

20220621092245_validate_not_null_constraint_on_routes_namespace_id_column.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 73e2f6b2b38b30a39c3620149f733b3f45d04499 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

class ValidateNotNullConstraintOnRoutesNamespaceIdColumn < Gitlab::Database::Migration[2.0]
  disable_ddl_transaction!

  def up
    validate_not_null_constraint :routes, :namespace_id
  end

  def down
    remove_not_null_constraint :routes, :namespace_id
    add_not_null_constraint :routes, :namespace_id, validate: false
  end
end