From 394cbdd75ba4d6825fe491e5c98f1f0a708561bf Mon Sep 17 00:00:00 2001 From: Goldloli <39011904+Goldloli@users.noreply.github.com> Date: Mon, 2 Nov 2026 18:26:58 +0800 Subject: [PATCH 1/2] fix(tempo): change team summary column to text --- .../20261102_change_team_summary_type.go | 41 +++++++++++++++++++ .../tempo/models/migrationscripts/register.go | 1 + backend/plugins/tempo/models/team.go | 2 +- 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 backend/plugins/tempo/models/migrationscripts/20261102_change_team_summary_type.go diff --git a/backend/plugins/tempo/models/migrationscripts/20261102_change_team_summary_type.go b/backend/plugins/tempo/models/migrationscripts/20261102_change_team_summary_type.go new file mode 100644 index 00000000000..8023375c0ab --- /dev/null +++ b/backend/plugins/tempo/models/migrationscripts/20261102_change_team_summary_type.go @@ -0,0 +1,41 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information regarding +copyright ownership. The ASF licenses this file to You under +the Apache License, Version 2.0 (the "License"); you may not +use this file except in compliance with the License. You may +obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package migrationscripts + +import ( + "github.com/apache/devlake/core/context" + "github.com/apache/devlake/core/errors" + "github.com/apache/devlake/core/plugin" +) + +var _ plugin.MigrationScript = (*changeTeamSummaryType)(nil) + +type changeTeamSummaryType struct{} + +func (script *changeTeamSummaryType) Up(basicRes context.BasicRes) errors.Error { + return basicRes.GetDal().ModifyColumnType("_tool_tempo_teams", "summary", "text") +} + +func (*changeTeamSummaryType) Version() uint64 { + return 20261102150000 +} + +func (*changeTeamSummaryType) Name() string { + return "change _tool_tempo_teams.summary type to text" +} diff --git a/backend/plugins/tempo/models/migrationscripts/register.go b/backend/plugins/tempo/models/migrationscripts/register.go index 49d6289cac7..3be3e153365 100644 --- a/backend/plugins/tempo/models/migrationscripts/register.go +++ b/backend/plugins/tempo/models/migrationscripts/register.go @@ -25,5 +25,6 @@ import ( func All() []plugin.MigrationScript { return []plugin.MigrationScript{ new(tempoInitTables20240401), + new(changeTeamSummaryType), } } diff --git a/backend/plugins/tempo/models/team.go b/backend/plugins/tempo/models/team.go index 86067f2e6db..e834240e0cb 100644 --- a/backend/plugins/tempo/models/team.go +++ b/backend/plugins/tempo/models/team.go @@ -34,7 +34,7 @@ type TempoTeam struct { Id int64 `json:"id" gorm:"-" mapstructure:"-"` // JS scope selector compatibility (mirrors TeamId) Key string `json:"key" mapstructure:"key" gorm:"type:varchar(255)"` Name string `json:"name" mapstructure:"name" gorm:"type:varchar(255)"` - Summary string `json:"summary" mapstructure:"summary" gorm:"type:varchar(255)"` + Summary string `json:"summary" mapstructure:"summary" gorm:"type:text"` } // AfterFind populates the virtual Id field after reading from DB From 8ecdb0f96e68e2ce054b1a75918053db989ec23a Mon Sep 17 00:00:00 2001 From: Goldloli <39011904+Goldloli@users.noreply.github.com> Date: Tue, 3 Nov 2026 10:43:17 +0800 Subject: [PATCH 2/2] fix: match the goheader license template line wrapping --- .../20261102_change_team_summary_type.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/backend/plugins/tempo/models/migrationscripts/20261102_change_team_summary_type.go b/backend/plugins/tempo/models/migrationscripts/20261102_change_team_summary_type.go index 8023375c0ab..2ad7725aa12 100644 --- a/backend/plugins/tempo/models/migrationscripts/20261102_change_team_summary_type.go +++ b/backend/plugins/tempo/models/migrationscripts/20261102_change_team_summary_type.go @@ -1,11 +1,10 @@ /* -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information regarding -copyright ownership. The ASF licenses this file to You under -the Apache License, Version 2.0 (the "License"); you may not -use this file except in compliance with the License. You may -obtain a copy of the License at +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0