diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-07 02:23:58 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-08 01:19:17 +0300 |
commit | 9dbd7e5aec921e43f3ea89c8e3357ca0174b0937 (patch) | |
tree | da089409d276cb6b048c52cb91a4d74f829ffda1 /db/migrate | |
parent | bc57ff0ef023db3d07f1adfa6a309fb4a24ed203 (diff) |
Allow notification email to be set separately from primary email.
Closes #1932.
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20150206222854_add_notification_email_to_user.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20150206222854_add_notification_email_to_user.rb b/db/migrate/20150206222854_add_notification_email_to_user.rb new file mode 100644 index 00000000000..ab80f7e582f --- /dev/null +++ b/db/migrate/20150206222854_add_notification_email_to_user.rb @@ -0,0 +1,11 @@ +class AddNotificationEmailToUser < ActiveRecord::Migration + def up + add_column :users, :notification_email, :string + + execute "UPDATE users SET notification_email = email" + end + + def down + remove_column :users, :notification_email + end +end |