Hi,
I have run into a strange situation, where heroku run rake db:migrate
refuses to run a table creation. I got in the mess due to some
mistakes on my part (see context section below). But I am looking for
a way to salvage the situation. Any suggestions?
Context:
1. I had a table called products on the local database and heroku
database both.
2. I created a migration to drop the table locally, ran it and added a
new migration to create the same table with a new structure. I got
rid of the table drop migration (I DON'T KNOW WHY!!). I later realized
the mistake as I could not push the latest migration to heroku which
complained that "products table already exists".
3. To solve the problem outlined above I got on the heroku console and
ran the following:
ActiveRecord::Migration.drop_table("products")
4. Then I ran the following to ensure that the new table gets created:
heroku run rake db:migrate
5. Heroku does not give any errors but it does not give any error but
does not create the table either (the migration is not running!). The
logs do not reveal anything. I just see the following:
2011-12-17T22:15:47+00:00 heroku[run.23]: State changed from created
to starting
2011-12-17T22:15:53+00:00 app[run.23]: Awaiting client
2011-12-17T22:15:53+00:00 app[run.23]: Starting process with command
`bundle exec rake db:migrate`
2011-12-17T22:15:54+00:00 heroku[run.23]: State changed from starting
to up
2011-12-17T22:16:00+00:00 heroku[run.23]: State changed from up to
complete
2011-12-17T22:16:01+00:00 heroku[run.23]: Process exited
2011-12-17T22:32:05+00:00 heroku[run.24]: State changed from created
to starting
2011-12-17T22:32:13+00:00 app[run.24]: Awaiting client
2011-12-17T22:32:13+00:00 app[run.24]: Starting process with command
`bundle exec rake db:migrate`
2011-12-17T22:32:14+00:00 heroku[run.24]: State changed from starting
to up
2011-12-17T22:32:20+00:00 heroku[run.24]: State changed from up to
complete
2011-12-17T22:32:20+00:00 heroku[run.24]: Process exited
Any suggestions on what to do?
Thx.
--
You received this message because you are subscribed to the Google Groups
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en.