debian-mirror-gitlab/db/migrate/20160620115026_add_index_on_runners_locked.rb

20 lines
477 B
Ruby
Raw Normal View History

2016-06-22 15:30:34 +05:30
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
2017-08-17 22:00:37 +05:30
# rubocop:disable RemoveIndex
2019-02-15 15:39:39 +05:30
class AddIndexOnRunnersLocked < ActiveRecord::Migration[4.2]
2016-06-22 15:30:34 +05:30
include Gitlab::Database::MigrationHelpers
2017-08-17 22:00:37 +05:30
DOWNTIME = false
2016-06-22 15:30:34 +05:30
disable_ddl_transaction!
2017-08-17 22:00:37 +05:30
def up
2016-06-22 15:30:34 +05:30
add_concurrent_index :ci_runners, :locked
end
2017-08-17 22:00:37 +05:30
def down
remove_index :ci_runners, :locked if index_exists? :ci_runners, :locked
end
2016-06-22 15:30:34 +05:30
end