I added a table (Debug) to my app, and created rows in it in an initializer
script. When I pushed it to Heroku I couldn't run rake db:migrate, because
Heroku first wanted to initialize the environment, and since the
initialization tried to access the table that was about to be created, the
migration failed. Very frustrating.

I had to first comment out the line that used the table, push to heroku,
then migrate. I have not encountered this problem before, neither locally
nor on my former host. Unless I have failed to see something obvious (which
is quite likely), I would say this ranks as a bug.

Please enlighten me.

Also, what is the proper thing to do after pushing code that adds new
migrations? Running db:migrate? Or db:schema:load? (Having first dumped
schema.rb locally and checked it in.)

Is it ever necessary/proper to execute db:drop or db:create?

The db migrations have been the trickiest part of my Heroku experience so
far.

Felix

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to