diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20150206222854_add_notification_email_to_user.rb | 11 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 13 insertions, 1 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 diff --git a/db/schema.rb b/db/schema.rb index f8c42f1871a..727d86eb767 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150206181414) do +ActiveRecord::Schema.define(version: 20150206222854) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -448,6 +448,7 @@ ActiveRecord::Schema.define(version: 20150206181414) do t.datetime "last_credential_check_at" t.string "github_access_token" t.string "gitlab_access_token" + t.string "notification_email" end add_index "users", ["admin"], name: "index_users_on_admin", using: :btree |