summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorAishwarya Subramanian <asubramanian@gitlab.com>2019-08-26 18:20:18 +0000
committerLin Jen-Shin <godfat@godfat.org>2019-08-26 18:20:18 +0000
commita06410d995e1200c7734b2d50e68506320d13dd0 (patch)
treed8077fbd6de237c020686c2a69533a772d65f8f8 /db
parente2251a09bd6f93bdf7734011a2b52b2a43b86799 (diff)
downloadgitlab-ce-a06410d995e1200c7734b2d50e68506320d13dd0.tar.gz
Using before_save method instead of setter
Removed unused method for name setter method
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190820163320_add_first_last_name_to_user.rb14
-rw-r--r--db/schema.rb4
2 files changed, 17 insertions, 1 deletions
diff --git a/db/migrate/20190820163320_add_first_last_name_to_user.rb b/db/migrate/20190820163320_add_first_last_name_to_user.rb
new file mode 100644
index 00000000000..0ea465fc2e2
--- /dev/null
+++ b/db/migrate/20190820163320_add_first_last_name_to_user.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddFirstLastNameToUser < ActiveRecord::Migration[5.2]
+ # Set this constant to true if this migration requires downtime.
+ DOWNTIME = false
+
+ def change
+ add_column(:users, :first_name, :string, null: true, limit: 255)
+ add_column(:users, :last_name, :string, null: true, limit: 255)
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 944d23e5365..36bf2371994 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2019_08_15_093949) do
+ActiveRecord::Schema.define(version: 2019_08_20_163320) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
@@ -3511,6 +3511,8 @@ ActiveRecord::Schema.define(version: 2019_08_15_093949) do
t.text "note"
t.integer "roadmap_layout", limit: 2
t.integer "bot_type", limit: 2
+ t.string "first_name", limit: 255
+ t.string "last_name", limit: 255
t.index ["accepted_term_id"], name: "index_users_on_accepted_term_id"
t.index ["admin"], name: "index_users_on_admin"
t.index ["bot_type"], name: "index_users_on_bot_type"