summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-07 18:42:34 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-07 18:42:34 -0800
commit3cd036e315576b8cd56f16965be6c4293b641a20 (patch)
tree7704725af660790ca79980a6f8da2db5b3efddbc /db
parent49d6721329bd9fccf656bb750ee8f6c712852cf6 (diff)
parent9dbd7e5aec921e43f3ea89c8e3357ca0174b0937 (diff)
downloadgitlab-ce-3cd036e315576b8cd56f16965be6c4293b641a20.tar.gz
Merge branch 'notification_email'
Conflicts: db/schema.rb
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 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