summaryrefslogtreecommitdiff
path: root/db/migrate
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/migrate
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/migrate')
-rw-r--r--db/migrate/20190820163320_add_first_last_name_to_user.rb14
1 files changed, 14 insertions, 0 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