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/post_migrate/20220316102900_add_index_to_deploy_tokens_on_creator_id.rb')
-rw-r--r--db/post_migrate/20220316102900_add_index_to_deploy_tokens_on_creator_id.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/post_migrate/20220316102900_add_index_to_deploy_tokens_on_creator_id.rb b/db/post_migrate/20220316102900_add_index_to_deploy_tokens_on_creator_id.rb
new file mode 100644
index 00000000000..7cc942c813b
--- /dev/null
+++ b/db/post_migrate/20220316102900_add_index_to_deploy_tokens_on_creator_id.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddIndexToDeployTokensOnCreatorId < Gitlab::Database::Migration[1.0]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_deploy_tokens_on_creator_id'
+
+ def up
+ add_concurrent_index :deploy_tokens, :creator_id, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index :deploy_tokens, :creator_id, name: INDEX_NAME
+ end
+end