From 457fc3e287fff6b15e64a1cd0f59ec2296ce4a93 Mon Sep 17 00:00:00 2001 From: Michael Kozono Date: Mon, 7 Aug 2017 18:19:26 -0700 Subject: =?UTF-8?q?Add=20=E2=80=9Copted=20in=20to=20emails=E2=80=9D=20user?= =?UTF-8?q?=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20170808005254_add_email_opted_in_fields_to_users.rb | 13 +++++++++++++ db/schema.rb | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20170808005254_add_email_opted_in_fields_to_users.rb 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 -- cgit v1.2.1