summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-08-07 18:19:26 -0700
committerMichael Kozono <mkozono@gmail.com>2017-08-07 19:30:04 -0700
commit457fc3e287fff6b15e64a1cd0f59ec2296ce4a93 (patch)
tree8b41cf9491949740d6b531866e574bd7ff59a07e
parent4490af8cf22416f12c8cf2e00f8b7c293be08167 (diff)
downloadgitlab-ce-457fc3e287fff6b15e64a1cd0f59ec2296ce4a93.tar.gz
Add “opted in to emails” user fields
-rw-r--r--db/migrate/20170808005254_add_email_opted_in_fields_to_users.rb13
-rw-r--r--db/schema.rb4
2 files changed, 16 insertions, 1 deletions
diff --git a/db/migrate/20170808005254_add_email_opted_in_fields_to_users.rb b/db/migrate/20170808005254_add_email_opted_in_fields_to_users.rb
new file mode 100644
index 00000000000..2136717bce1
--- /dev/null
+++ b/db/migrate/20170808005254_add_email_opted_in_fields_to_users.rb
@@ -0,0 +1,13 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddEmailOptedInFieldsToUsers < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :users, :email_opted_in, :boolean, null: true
+ add_column :users, :email_opted_in_ip, :string, null: true
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index dc5640ad2ca..08efe71fb19 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: 20170803130232) do
+ActiveRecord::Schema.define(version: 20170808005254) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -1560,6 +1560,8 @@ ActiveRecord::Schema.define(version: 20170803130232) do
t.string "rss_token"
t.boolean "external_email", default: false, null: false
t.string "email_provider"
+ t.boolean "email_opted_in"
+ t.string "email_opted_in_ip"
end
add_index "users", ["admin"], name: "index_users_on_admin", using: :btree