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.

Search Discussions

  • Peter Vandenabeele at Jan 2, 2012 at 7:19 am
    Third argument to change_column_default should not be a hash, probably a
    nil.

    Peter

    On Jan 2, 2012 7:30 a.m., "Dave Castellano" wrote:

    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.

    --
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJan 2, '12 at 6:30a
activeJan 2, '12 at 7:19a
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase