blob: 22d50e4165a5a2c20fcac593e60cb7635cfb6eaa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# rubocop:disable RemoveIndex
class AddIndexForBuildToken < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :ci_builds, :token, unique: true
end
def down
remove_index :ci_builds, :token, unique: true if index_exists? :ci_builds, :token, unique: true
end
end
|