From eccfab6a195be5bdb2f5c32e711b19ecda5c96a5 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 17 May 2017 09:18:22 +0800 Subject: [PATCH] Use `execute` instead of `exec_sql` in migration. --- ...migrate_mailing_list_daily_updates_users_to_daily_summary.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20170505035229_migrate_mailing_list_daily_updates_users_to_daily_summary.rb b/db/migrate/20170505035229_migrate_mailing_list_daily_updates_users_to_daily_summary.rb index 418bfe2e95b..735d5278059 100644 --- a/db/migrate/20170505035229_migrate_mailing_list_daily_updates_users_to_daily_summary.rb +++ b/db/migrate/20170505035229_migrate_mailing_list_daily_updates_users_to_daily_summary.rb @@ -2,7 +2,7 @@ class MigrateMailingListDailyUpdatesUsersToDailySummary < ActiveRecord::Migratio def change change_column_default :user_options, :mailing_list_mode_frequency, 1 - UserOption.exec_sql(<<~SQL) + execute <<~SQL UPDATE user_options SET digest_after_minutes = 1440, email_digests = 't', mailing_list_mode = 'f' WHERE mailing_list_mode_frequency = 0 AND mailing_list_mode