Project

General

Profile

Patch #29171 ยป 29171.patch

Go MAEDA, 2022-10-12 16:38

View differences:

db/migrate/20221012135202_add_index_to_custom_values.rb
1
class AddIndexToCustomValues < ActiveRecord::Migration[6.1]
2
  def change
3
    say_with_time 'Adding unique index on custom_values, this may take some time...' do
4
      add_index :custom_values, [:customized_type, :customized_id, :custom_field_id], name: :custom_values_customized_custom_field
5
      remove_index :custom_values, column: [:customized_type, :customized_id], name: :custom_values_customized
6
    end
7
  end
8
end
    (1-1/1)