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:
authorDylan Griffith <dyl.griffith@gmail.com>2018-05-11 12:10:41 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2018-05-15 13:01:00 +0300
commit528859ddcf9890c5671ff57e36df7fb24aceea31 (patch)
treec4b816814a29f7ca811f1d152a28c0957d2bcc6f /db/migrate
parentf91aaccf4d0c182c01046ba38cbd9ed30b9d3684 (diff)
Add index on runner_type for ci_runners
We use this to filter runner and will use this increasingly in future instead of is_shared so it should be indexed
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20180511090724_add_index_on_ci_runners_runner_type.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20180511090724_add_index_on_ci_runners_runner_type.rb b/db/migrate/20180511090724_add_index_on_ci_runners_runner_type.rb
new file mode 100644
index 00000000000..580f56007c7
--- /dev/null
+++ b/db/migrate/20180511090724_add_index_on_ci_runners_runner_type.rb
@@ -0,0 +1,15 @@
+class AddIndexOnCiRunnersRunnerType < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :ci_runners, :runner_type
+ end
+
+ def down
+ remove_index :ci_runners, :runner_type
+ end
+end