Team: Add columns external_uid and is_provisioned to the team table (#103285)

* add columns external_id and is_provisioned to the team table

* generate openapi specs

* rename column to external_uid

* generate open api specs

* increase limit for external_uid to 256
This commit is contained in:
Mihai Doarna
2025-04-04 11:00:14 +03:00
committed by GitHub
parent f19e4f95d5
commit 10411361e7
15 changed files with 143 additions and 42 deletions
+4 -4
View File
@@ -32,13 +32,13 @@ func ProvideService(db db.DB, cfg *setting.Cfg, tracer tracing.Tracer) (team.Ser
}, nil
}
func (s *Service) CreateTeam(ctx context.Context, name, email string, orgID int64) (team.Team, error) {
func (s *Service) CreateTeam(ctx context.Context, cmd *team.CreateTeamCommand) (team.Team, error) {
_, span := s.tracer.Start(ctx, "team.CreateTeam", trace.WithAttributes(
attribute.Int64("orgID", orgID),
attribute.String("name", name),
attribute.Int64("orgID", cmd.OrgID),
attribute.String("name", cmd.Name),
))
defer span.End()
return s.store.Create(name, email, orgID)
return s.store.Create(ctx, cmd)
}
func (s *Service) UpdateTeam(ctx context.Context, cmd *team.UpdateTeamCommand) error {