I'm trying to add a "sticky" option on my forum topics. This is how my migration looks like
def self.up
add_column :topics, :sticky, :boolean, :null => false, :default => false
end
def self.down
remove_column :topics, :sticky
end
This works perfect locally on mysql, but when I push the changes to heroku (which uses PostgreSQL), this is what I get when using the console
>> t.sticky
=> "f"
>> t.sticky.class
=> String
>> t.sticky = true
=> true
>> t.sticky.class
=> TrueClass
Why is the default value of this property a String?
Edit: And if I save the object, it doesn't change the sticky property, i.e. it's still "f".