chantra/redmine_newissuealerts — Issue #16: Datatypes in Migration Scripts with PostgreSQL back-end
Author: edoceo
Created: 2012-03-09 20:59:20+00:00
State: open

I had to change the data types to get this to work with my PostgreSQL system.

db/migrate/20110722141200_add_priority_to_newissuealerts.rb

- add_column(:newissuealerts, :priority, :boolean, {:default=>0}
+ add_column(:newissuealerts, :priority, :integer, {:default=>0}

db/migrate/20110722144500_alter_newissuealerts_set_defaults.rb

And in this one the default is specified as 0 when it should be "false"

- change_column_default(:newissuealerts, :enabled, 0)
+ change_column_default(:newissuealerts, :enabled, false)

HTH