nilenso/ashoka-survey-web

db:migrate fails in case of mysql2 gem.

vibinnair opened this issue · 2 comments

Hi,
Though the recommended database is postgres, i tried setting up my app using mysql database. However it failed in db:migrate for the migration file : 20120913065000_add_column_published_to_surveys.rb.

The following error was thrown: https://gist.github.com/4337065.

I am using mysql2 gem.

It was happening due to the use of symbol in :default => :false in the file 20120913065000_add_column_published_to_surveys.rb.

I was able to resolve this issue by removing the symbol and changing the line to
add_column :surveys, :published, :boolean, :default => false

After making the changes tested the migration for both the database and it works fine.

(Reference: http://tinyurl.com/cx4q76c)

Can i send a pull request with the changes?