debian-mirror-gitlab/db/migrate/20160808085602_add_index_for_build_token.rb

18 lines
445 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
# rubocop:disable RemoveIndex
2019-02-15 15:39:39 +05:30
class AddIndexForBuildToken < ActiveRecord::Migration[4.2]
2016-09-29 09:46:39 +05:30
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
disable_ddl_transaction!
2017-08-17 22:00:37 +05:30
def up
2016-09-29 09:46:39 +05:30
add_concurrent_index :ci_builds, :token, unique: true
end
2017-08-17 22:00:37 +05:30
def down
remove_index :ci_builds, :token, unique: true if index_exists? :ci_builds, :token, unique: true
end
2016-09-29 09:46:39 +05:30
end