Rails 3 migrations: boolean (mysql vs postgreSQL)
问题 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