summaryrefslogtreecommitdiff
path: root/db/migrate/20160328115649_migrate_new_notification_setting.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20160328115649_migrate_new_notification_setting.rb')
-rw-r--r--db/migrate/20160328115649_migrate_new_notification_setting.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20160328115649_migrate_new_notification_setting.rb b/db/migrate/20160328115649_migrate_new_notification_setting.rb
index 3c81b2c37bf..5ba09e75145 100644
--- a/db/migrate/20160328115649_migrate_new_notification_setting.rb
+++ b/db/migrate/20160328115649_migrate_new_notification_setting.rb
@@ -5,7 +5,7 @@
# - during migration some users will receive notifications based on their global settings (project/group settings will be ignored)
# - its possible to get duplicate records for notification settings since we don't create uniq index yet
#
-class MigrateNewNotificationSetting < ActiveRecord::Migration
+class MigrateNewNotificationSetting < ActiveRecord::Migration[4.2]
def up
timestamp = Time.now.strftime('%F %T')
execute "INSERT INTO notification_settings ( user_id, source_id, source_type, level, created_at, updated_at ) SELECT user_id, source_id, source_type, notification_level, '#{timestamp}', '#{timestamp}' FROM members WHERE user_id IS NOT NULL"