19 lines
447 B
Ruby
19 lines
447 B
Ruby
![]() |
# frozen_string_literal: true
|
||
|
|
||
|
class AddUniqueIndexOnProjectsOnRunnersToken < Gitlab::Database::Migration[2.0]
|
||
|
disable_ddl_transaction!
|
||
|
|
||
|
INDEX_NAME = 'index_uniq_projects_on_runners_token'
|
||
|
|
||
|
def up
|
||
|
add_concurrent_index :projects,
|
||
|
:runners_token,
|
||
|
name: INDEX_NAME,
|
||
|
unique: true
|
||
|
end
|
||
|
|
||
|
def down
|
||
|
remove_concurrent_index_by_name :projects, INDEX_NAME
|
||
|
end
|
||
|
end
|