summaryrefslogtreecommitdiff
path: root/db/migrate/20220114131950_add_status_only_index_to_packages_package_files.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20220114131950_add_status_only_index_to_packages_package_files.rb')
-rw-r--r--db/migrate/20220114131950_add_status_only_index_to_packages_package_files.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20220114131950_add_status_only_index_to_packages_package_files.rb b/db/migrate/20220114131950_add_status_only_index_to_packages_package_files.rb
new file mode 100644
index 00000000000..948edea1138
--- /dev/null
+++ b/db/migrate/20220114131950_add_status_only_index_to_packages_package_files.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddStatusOnlyIndexToPackagesPackageFiles < Gitlab::Database::Migration[1.0]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_packages_package_files_on_status'
+
+ def up
+ add_concurrent_index :packages_package_files, :status, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :packages_package_files, name: INDEX_NAME
+ end
+end