I have a Rails app, where one of the models does not have the id column. Doing some research I found the migration that created it:
id
create_table
You don't need to mention :integer
:integer
rails g migration add_id_to_model id:primary_key worked for me.
rails g migration add_id_to_model id:primary_key