diff options
Diffstat (limited to 'db/post_migrate/20221104141647_add_index_for_non_public_top_level_groups_to_namespaces.rb')
-rw-r--r-- | db/post_migrate/20221104141647_add_index_for_non_public_top_level_groups_to_namespaces.rb | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/db/post_migrate/20221104141647_add_index_for_non_public_top_level_groups_to_namespaces.rb b/db/post_migrate/20221104141647_add_index_for_non_public_top_level_groups_to_namespaces.rb deleted file mode 100644 index ade35a39737..00000000000 --- a/db/post_migrate/20221104141647_add_index_for_non_public_top_level_groups_to_namespaces.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForNonPublicTopLevelGroupsToNamespaces < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = 'namespaces' - INDEX_NAME = 'index_namespaces_on_type_and_visibility_and_parent_id' - CONDITIONS = "(type = 'Group' AND parent_id IS NULL AND visibility_level != 20)" - - def up - add_concurrent_index TABLE_NAME, :id, name: INDEX_NAME, where: CONDITIONS - end - - def down - remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME - end -end |