diff options
author | Aishwarya Subramanian <asubramanian@gitlab.com> | 2019-08-26 18:20:18 +0000 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-08-26 18:20:18 +0000 |
commit | a06410d995e1200c7734b2d50e68506320d13dd0 (patch) | |
tree | d8077fbd6de237c020686c2a69533a772d65f8f8 /db/migrate | |
parent | e2251a09bd6f93bdf7734011a2b52b2a43b86799 (diff) | |
download | gitlab-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.rb | 14 |
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 |