summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-06-20 12:03:21 +0000
committerLin Jen-Shin <godfat@godfat.org>2016-06-20 12:03:21 +0000
commitc628eeb773a962c66bcb4f73bfee60cdc28d2435 (patch)
treee7aad0ddd451b33405a931fc0f60b150def073f0 /db/migrate
parent4efc1c4a68538126bc4cfad6d9b60710bee36f14 (diff)
downloadgitlab-ce-c628eeb773a962c66bcb4f73bfee60cdc28d2435.tar.gz
Add index for ci_runners.locked, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12571602 and https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12571670
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20160620115026_add_index_on_runners_locked.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/db/migrate/20160620115026_add_index_on_runners_locked.rb b/db/migrate/20160620115026_add_index_on_runners_locked.rb
new file mode 100644
index 00000000000..dfa5110dea4
--- /dev/null
+++ b/db/migrate/20160620115026_add_index_on_runners_locked.rb
@@ -0,0 +1,12 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddIndexOnRunnersLocked < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ disable_ddl_transaction!
+
+ def change
+ add_concurrent_index :ci_runners, :locked
+ end
+end