Actually, the problem is the inverse of what I describe below: the db schema is fine - but ActiveRecord::Base#save! is seeing my query type as having a main_entity_id in production, whereas it works correctly locally. I am using the bamboo stack. I dont have any reference to queries#main_entity in my entire code - so not sure which file is out of sync between local and production?
Thanks Anand On Sat, Jun 26, 2010 at 12:55 PM, rcanand <[email protected]> wrote: > Hi, > > I had a field called main_entity_id on a query table on heroku, which > I hence renamed to entity_id in dev. I have pushed the new code out to > heroku but the schema still has main_entity_id and fails in different > places. For example: > > ActiveRecord::StatementInvalid (PGError: ERROR: column > "main_entity_id" of relation "queries" does not exist > > I tried heroku db:reset (which runs through without error, but doesnt > fix the problem, the same stale field name remains), > > heroku rake db:migrate:reset doesnt work, which is what I would do > locally (I get an error that I dont have permissions to remove some > junky-named database ): > > roksclafsu already exists > (in /disk1/home/slugs/213085_12f2dbe_f3c7/mnt) > Couldn't drop roksclafsu : #<ActiveRecord::StatementInvalid: PGError: > ERROR: must be owner of database roksclafsu > : DROP DATABASE IF EXISTS "roksclafsu"> > > How do I get heroku to pick up the changes? Is there a way to drop a > specific table from heroku console, and recreate it by running a > specific migration? > > Thanks > Anand -- 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.
