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

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

class DropIndexNamespacesOnLdapSyncLastUpdateAt < Gitlab::Database::Migration[2.1]
  disable_ddl_transaction!

  TABLE_NAME = :namespaces
  INDEX_NAME = :index_namespaces_on_ldap_sync_last_update_at

  def up
    remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
  end

  def down
    # no-op
    # Since adding the same index will be time consuming,
    # we have to create it asynchronously using 'prepare_async_index' helper (if needed).
  end
end