Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20210914172202_add_status_index_to_dependency_proxy_tables.rb')
-rw-r--r--db/migrate/20210914172202_add_status_index_to_dependency_proxy_tables.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20210914172202_add_status_index_to_dependency_proxy_tables.rb b/db/migrate/20210914172202_add_status_index_to_dependency_proxy_tables.rb
new file mode 100644
index 00000000000..9b593fbe540
--- /dev/null
+++ b/db/migrate/20210914172202_add_status_index_to_dependency_proxy_tables.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddStatusIndexToDependencyProxyTables < Gitlab::Database::Migration[1.0]
+ MANIFEST_INDEX_NAME = 'index_dependency_proxy_manifests_on_status'
+ BLOB_INDEX_NAME = 'index_dependency_proxy_blobs_on_status'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :dependency_proxy_manifests, :status, name: MANIFEST_INDEX_NAME
+ add_concurrent_index :dependency_proxy_blobs, :status, name: BLOB_INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :dependency_proxy_manifests, MANIFEST_INDEX_NAME
+ remove_concurrent_index_by_name :dependency_proxy_blobs, BLOB_INDEX_NAME
+ end
+end