Patch #29171 ยป 29171.patch
| db/migrate/20221012135202_add_index_to_custom_values.rb | ||
|---|---|---|
|
class AddIndexToCustomValues < ActiveRecord::Migration[6.1]
|
||
|
def change
|
||
|
say_with_time 'Adding unique index on custom_values, this may take some time...' do
|
||
|
add_index :custom_values, [:customized_type, :customized_id, :custom_field_id], name: :custom_values_customized_custom_field
|
||
|
remove_index :custom_values, column: [:customized_type, :customized_id], name: :custom_values_customized
|
||
|
end
|
||
|
end
|
||
|
end
|
||