diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-11 11:10:41 +0200 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-15 12:01:00 +0200 |
commit | 528859ddcf9890c5671ff57e36df7fb24aceea31 (patch) | |
tree | c4b816814a29f7ca811f1d152a28c0957d2bcc6f /db/migrate/20180511090724_add_index_on_ci_runners_runner_type.rb | |
parent | f91aaccf4d0c182c01046ba38cbd9ed30b9d3684 (diff) | |
download | gitlab-ce-528859ddcf9890c5671ff57e36df7fb24aceea31.tar.gz |
Add index on runner_type for ci_runners46010-add-index-to-runner-type
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/20180511090724_add_index_on_ci_runners_runner_type.rb')
-rw-r--r-- | db/migrate/20180511090724_add_index_on_ci_runners_runner_type.rb | 15 |
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 |