Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-07 02:23:58 +0300
committerDouwe Maan <douwe@gitlab.com>2015-02-08 01:19:17 +0300
commit9dbd7e5aec921e43f3ea89c8e3357ca0174b0937 (patch)
treeda089409d276cb6b048c52cb91a4d74f829ffda1 /db
parentbc57ff0ef023db3d07f1adfa6a309fb4a24ed203 (diff)
Allow notification email to be set separately from primary email.
Closes #1932.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20150206222854_add_notification_email_to_user.rb11
-rw-r--r--db/schema.rb3
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 0e4af3df7c2..e679f0106d3 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: 20150125163100) do
+ActiveRecord::Schema.define(version: 20150206222854) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -436,6 +436,7 @@ ActiveRecord::Schema.define(version: 20150125163100) do
t.string "website_url", default: "", null: false
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