mirror of
https://github.com/redmine/redmine.git
synced 2025-10-26 00:36:14 +02:00
Add an index to improve the performance of issue queries involving custom fields (#29171).
Contributed by Stephane Evr. git-svn-id: https://svn.redmine.org/redmine/trunk@21955 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
6
db/migrate/20221012135202_add_index_to_custom_values.rb
Normal file
6
db/migrate/20221012135202_add_index_to_custom_values.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class AddIndexToCustomValues < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
remove_index :custom_values, column: [:customized_type, :customized_id], name: :custom_values_customized, if_exists: true
|
||||
add_index :custom_values, [:customized_type, :customized_id, :custom_field_id], name: :custom_values_customized_custom_field
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user