diff options
Diffstat (limited to 'db/migrate/20231030051838_add_index_to_packages_tags_project_id.rb')
-rw-r--r-- | db/migrate/20231030051838_add_index_to_packages_tags_project_id.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20231030051838_add_index_to_packages_tags_project_id.rb b/db/migrate/20231030051838_add_index_to_packages_tags_project_id.rb new file mode 100644 index 00000000000..17512137fff --- /dev/null +++ b/db/migrate/20231030051838_add_index_to_packages_tags_project_id.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddIndexToPackagesTagsProjectId < Gitlab::Database::Migration[2.2] + milestone '16.6' + disable_ddl_transaction! + INDEX_NAME = :index_packages_tags_on_project_id + + def up + add_concurrent_index :packages_tags, :project_id, name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name(:packages_tags, INDEX_NAME) + end +end |