I have a Heroku app that I imported existing data into. Apparently it has screwed up my pk sequences in all my tables. How can I reset all the sequences of my tables?
I found this Rails auto-assigning id that already exists
And it says to use this:
ActiveRecord::Base.connection.tables.each do |t|
ActiveRecord::Base.connection.reset_pk_sequence!(t)
end;nil
My problem is I have no idea how to run this on my Heroku app.
Any help is appreciated!!!