This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 723b45997 fix(tempo): change team summary column to text (#9303)
723b45997 is described below

commit 723b45997c0430ccf3dace2365c15064e168700f
Author: 小卡塔克 <[email protected]>
AuthorDate: Fri Nov 6 15:04:57 2026 +0800

    fix(tempo): change team summary column to text (#9303)
    
    * fix(tempo): change team summary column to text
    
    * fix: match the goheader license template line wrapping
---
 ...ster.go => 20261102_change_team_summary_type.go} | 21 ++++++++++++++++-----
 .../tempo/models/migrationscripts/register.go       |  1 +
 backend/plugins/tempo/models/team.go                |  2 +-
 3 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/backend/plugins/tempo/models/migrationscripts/register.go 
b/backend/plugins/tempo/models/migrationscripts/20261102_change_team_summary_type.go
similarity index 61%
copy from backend/plugins/tempo/models/migrationscripts/register.go
copy to 
backend/plugins/tempo/models/migrationscripts/20261102_change_team_summary_type.go
index 49d6289ca..2ad7725aa 100644
--- a/backend/plugins/tempo/models/migrationscripts/register.go
+++ 
b/backend/plugins/tempo/models/migrationscripts/20261102_change_team_summary_type.go
@@ -18,12 +18,23 @@ 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"
 )
 
-// All returns all the migration scripts
-func All() []plugin.MigrationScript {
-       return []plugin.MigrationScript{
-               new(tempoInitTables20240401),
-       }
+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 49d6289ca..3be3e1533 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 86067f2e6..e834240e0 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

Reply via email to