diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-05-16 18:42:34 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-05-16 22:53:11 +0300 |
commit | ecce94d3aab57e099a8897a860023b8ec7acac05 (patch) | |
tree | 63db513f4516c1e1bb68eb06f88b0c64d6020f5d /db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb | |
parent | 7bb84e64979edda8e76f077bd58aeb35857aec23 (diff) |
fix default send confirmation value
Diffstat (limited to 'db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb')
-rw-r--r-- | db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb b/db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb new file mode 100644 index 00000000000..c34e7ba5409 --- /dev/null +++ b/db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb @@ -0,0 +1,12 @@ +class AddSendUserConfirmationEmailToApplicationSettings < ActiveRecord::Migration + def up + add_column :application_settings, :send_user_confirmation_email, :boolean, default: false + + #Sets confirmation email to true by default on existing installations. + execute "UPDATE application_settings SET send_user_confirmation_email=true" + end + + def down + remove_column :application_settings, :send_user_confirmation_email + end +end |