diff options
Diffstat (limited to 'db/post_migrate/20211006174114_add_namespace_index_on_type_sync.rb')
-rw-r--r-- | db/post_migrate/20211006174114_add_namespace_index_on_type_sync.rb | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/db/post_migrate/20211006174114_add_namespace_index_on_type_sync.rb b/db/post_migrate/20211006174114_add_namespace_index_on_type_sync.rb deleted file mode 100644 index 0185e4cbc5e..00000000000 --- a/db/post_migrate/20211006174114_add_namespace_index_on_type_sync.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddNamespaceIndexOnTypeSync < Gitlab::Database::Migration[1.0] - FULL_INDEX_NAME = 'index_namespaces_on_type_and_id' - PARTIAL_INDEX_NAME = 'index_namespaces_on_type_and_id_partial' - - disable_ddl_transaction! - - def up - add_concurrent_index :namespaces, [:type, :id], name: FULL_INDEX_NAME - - remove_concurrent_index_by_name :namespaces, name: PARTIAL_INDEX_NAME - end - - def down - add_concurrent_index(:namespaces, [:type, :id], where: 'type IS NOT NULL', name: PARTIAL_INDEX_NAME) - - remove_concurrent_index_by_name :namespaces, name: FULL_INDEX_NAME - end -end |