diff options
Diffstat (limited to 'db/post_migrate/20230412104514_add_index_to_group_group_links.rb')
-rw-r--r-- | db/post_migrate/20230412104514_add_index_to_group_group_links.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/post_migrate/20230412104514_add_index_to_group_group_links.rb b/db/post_migrate/20230412104514_add_index_to_group_group_links.rb new file mode 100644 index 00000000000..655bff43b3c --- /dev/null +++ b/db/post_migrate/20230412104514_add_index_to_group_group_links.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class AddIndexToGroupGroupLinks < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + INDEX_NAME = 'index_group_group_links_on_shared_with_group_and_group_access' + TABLE_NAME = :group_group_links + + def up + add_concurrent_index TABLE_NAME, [:shared_with_group_id, :group_access], name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name TABLE_NAME, name: INDEX_NAME + end +end |