Aşağıda bir dizinim indeks ile oluşturduğum bir geçişim var: true. Ancak, isim bu dizin için çok uzun olduğu için kendim adlandırmaya çalıştım. Ancak, bu koşmuyor görünmektedir. Aynı "adı çok uzun" hatası alıyorum. Endeksle böyle bir endeks adlandırmanın bir yolu var mı: doğru mu? Eğer değilse, add_index ile adlandırmaktan nasıl bahsederim? aşağıdaki gibi yerine trueİçindekiler için İndeks ile bir dizin adı: true
class CreateVehicleProductApplicationNotes < ActiveRecord::Migration
def change
create_table :vehicle_product_application_notes do |t|
t.references :product_id, index: true
t.references :product_application_id, index: true, :name "my_index"
t.references :note_id, index: true
t.timestamps
end
end
end