Commit 57c47fc0 authored by Robert May's avatar Robert May

Add index names to migrations

parent bd223c55
...@@ -11,10 +11,10 @@ class ModifyMergeRequestApiIndex < ActiveRecord::Migration[6.0] ...@@ -11,10 +11,10 @@ class ModifyMergeRequestApiIndex < ActiveRecord::Migration[6.0]
disable_ddl_transaction! disable_ddl_transaction!
def up def up
add_concurrent_index :merge_requests, [:target_project_id, :created_at, :id] add_concurrent_index :merge_requests, [:target_project_id, :created_at, :id], name: :index_merge_requests_on_target_project_id_and_created_at_and_id
end end
def down def down
remove_concurrent_index :merge_requests, [:target_project_id, :created_at, :id] remove_concurrent_index :merge_requests, [:target_project_id, :created_at, :id], name: :index_merge_requests_on_target_project_id_and_created_at_and_id
end end
end end
...@@ -8,10 +8,10 @@ class RemoveOldMergeRequestApiIndex < ActiveRecord::Migration[6.0] ...@@ -8,10 +8,10 @@ class RemoveOldMergeRequestApiIndex < ActiveRecord::Migration[6.0]
disable_ddl_transaction! disable_ddl_transaction!
def up def up
remove_concurrent_index :merge_requests, [:target_project_id, :created_at] remove_concurrent_index :merge_requests, [:target_project_id, :created_at], name: :index_merge_requests_target_project_id_created_at
end end
def down def down
add_concurrent_index :merge_requests, [:target_project_id, :created_at] add_concurrent_index :merge_requests, [:target_project_id, :created_at], name: :index_merge_requests_target_project_id_created_at
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment