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

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

class AddIndexForNextOverLimitCheckAt < Gitlab::Database::Migration[2.1]
  TABLE_NAME = 'namespace_details'
  INDEX_NAME = 'index_next_over_limit_check_at_asc_order'

  def up
    prepare_async_index TABLE_NAME,
      :next_over_limit_check_at,
      order: { next_over_limit_check_at: 'ASC NULLS FIRST' },
      name: INDEX_NAME
  end

  def down
    unprepare_async_index TABLE_NAME, INDEX_NAME
  end
end