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

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

class AddOrganizationsPathUniqueWithCaseSensitivity < Gitlab::Database::Migration[2.2]
  disable_ddl_transaction!
  milestone '16.7'

  INDEX_NAME = 'unique_organizations_on_path_case_insensitive'

  def up
    add_concurrent_index :organizations, '(lower(path))', unique: true, name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name :organizations, INDEX_NAME
  end
end