Ruby on Rails Sunday, January 1, 2012

Help Please...
Rails 3.1.3 ruby 1.9.3p0 Heroku --cedar

heroku run rake db:migrate causes the following error...

-- change_column_default(:users, :admin, {:default=>false})
rake aborted!
An error has occurred, this and all later migrations canceled:

PGError: ERROR: invalid input syntax for type boolean: "---
:default: false
"
: ALTER TABLE "users" ALTER COLUMN "admin" SET DEFAULT '---
:default: false

Im sure its a SQL to posrgreSQL issue, but having the defaults set is
not really imperative so decided to remove them in a migration...

I removed the defaults completely with a migration (after trying
several other schema changes thru migrations to see if postgreSQL on
Heroku would work).

No matter what I changed in later migrations, Heroku gives same error
message.

I tried removing the text from the offending migration, saving it, and
commiting the changes to Git, pushing them to Heroku, then rerunning
db:migrate, but it does not effect the error msg from Heroku. Heroku
seems to keep seeing the migration no matter what I do.

I guess I need to know how to clear heroku of the migration it is stuck
on and then have it not get stuck on the same migration when I run rake
db:migrate on heroku again...

Thanks in advance...

--
Posted via http://www.ruby-forum.com/.

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

No comments:

Post a Comment