File: 20221012135202_add_index_to_custom_values.rb

package info (click to toggle)
redmine 6.0.6%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 20,104 kB
  • sloc: ruby: 116,318; javascript: 12,885; sh: 460; perl: 303; python: 166; makefile: 30
file content (6 lines) | stat: -rw-r--r-- 338 bytes parent folder | download | duplicates (3)
1
2
3
4
5
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