summaryrefslogtreecommitdiffstats
path: root/db/migrate/20100129193813_update_mail_notification_values.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-09-28 18:22:00 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-09-28 18:22:00 +0000
commit0316af7f6bfa47ba1166eda3c5c7167229033a76 (patch)
treedb8d004f118674335919690a2f38b1b59782941b /db/migrate/20100129193813_update_mail_notification_values.rb
parent3a3263102a7cda4be1c90168a9d32fa904d58272 (diff)
downloadredmine-0316af7f6bfa47ba1166eda3c5c7167229033a76.tar.gz
redmine-0316af7f6bfa47ba1166eda3c5c7167229033a76.zip
Converted User#mail_notification from a boolean to a string.
The string will now store which type of notification option to use. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4216 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/20100129193813_update_mail_notification_values.rb')
-rw-r--r--db/migrate/20100129193813_update_mail_notification_values.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20100129193813_update_mail_notification_values.rb b/db/migrate/20100129193813_update_mail_notification_values.rb
new file mode 100644
index 000000000..bfe0a5952
--- /dev/null
+++ b/db/migrate/20100129193813_update_mail_notification_values.rb
@@ -0,0 +1,11 @@
+# Patch the data from a boolean change.
+class UpdateMailNotificationValues < ActiveRecord::Migration
+ def self.up
+ User.update_all("mail_notification = 'all'", "mail_notification = '1'")
+ User.update_all("mail_notification = 'only_my_events'", "mail_notification = '0'")
+ end
+
+ def self.down
+ # No-op
+ end
+end