summaryrefslogtreecommitdiff
path: root/db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-25 15:10:55 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-25 15:10:55 +0000
commitc59393a068f9d0113cc10ca8798d333d6a0e3d53 (patch)
tree57de87b7bb6206957fa0359551a50661d44bf594 /db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb
parentf471d836199c3e35a80769a6daa5c4b6a52be8d7 (diff)
downloadgitlab-ce-c59393a068f9d0113cc10ca8798d333d6a0e3d53.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb')
-rw-r--r--db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb b/db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb
new file mode 100644
index 00000000000..9125831fbf3
--- /dev/null
+++ b/db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class DropIndexOnCiRunnersToken < Gitlab::Database::Migration[2.0]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_ci_runners_on_token'
+
+ def up
+ remove_concurrent_index_by_name :ci_runners, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :ci_runners,
+ :token,
+ name: INDEX_NAME
+ end
+end