add: team nickname

This commit is contained in:
vilet.yy 2021-04-19 10:54:36 +08:00 committed by jasder
parent de6ae5b720
commit 3a47c61010
4 changed files with 8 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class Organizations::TeamsController < Organizations::BaseController
private
def team_params
params.permit(:name, :description, :authorize, :includes_all_project, :can_create_org_project, :unit_types => [])
params.permit(:name, :nickname, :description, :authorize, :includes_all_project, :can_create_org_project, :unit_types => [])
end
def load_organization

View File

@ -14,6 +14,7 @@
# gtid :integer
# created_at :datetime not null
# updated_at :datetime not null
# nickname :string(255)
#
# Indexes
#

View File

@ -1,5 +1,6 @@
json.id team.id
json.name team.name
json.nickname team.nickname
json.description team.description
json.authorize team.authorize
json.includes_all_project team.includes_all_project

View File

@ -0,0 +1,5 @@
class AddNicknameToTeams < ActiveRecord::Migration[5.2]
def change
add_column :teams, :nickname, :string
end
end