I am trying to add a index to a column which already exists in my table by using
I want to add a index on item_id on product_images table
bundle exec rails generate migration AddIndexToProductImages item_id:integer:index
but the code i see in the migration file is
class AddIndexToProductImages < ActiveRecord::Migration
def change
add_column :product_images, :item_id, :integer
end
end
Not sure what could be causing this, can anyone help? Thanks.
Aucun commentaire:
Enregistrer un commentaire