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

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

class IndexProjectsOnNamespaceIdAndRepositorySizeLimit < Gitlab::Database::Migration[2.1]
  INDEX_NAME = "index_projects_on_namespace_id_and_repository_size_limit"

  disable_ddl_transaction!

  def up
    # rubocop:disable Migration/PreventIndexCreation
    add_concurrent_index :projects, [:namespace_id, :repository_size_limit], name: INDEX_NAME
    # rubocop:enable Migration/PreventIndexCreation
  end

  def down
    remove_concurrent_index :projects, [:namespace_id, :repository_size_limit], name: INDEX_NAME
  end
end