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

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

class AddIndexOnProjectsPath < Gitlab::Database::Migration[1.0]
  disable_ddl_transaction!

  TABLE = :projects
  INDEX_NAME = 'index_on_projects_path'
  COLUMN = :path

  def up
    add_concurrent_index TABLE, COLUMN, name: INDEX_NAME
  end

  def down
    remove_concurrent_index TABLE, COLUMN, name: INDEX_NAME
  end
end