File tree Expand file tree Collapse file tree
backend/plugins/jenkins/models Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ type JenkinsJob struct {
3535 Base string `gorm:"type:varchar(255)" mapstructure:"base,omitempty" json:"base"`
3636 Url string `mapstructure:"url,omitempty" json:"url"`
3737 Description string `mapstructure:"description,omitempty" json:"description"`
38- PrimaryView string `gorm:"type:varchar(255) " mapstructure:"primaryView,omitempty" json:"primaryView"`
38+ PrimaryView string `gorm:"type:text " mapstructure:"primaryView,omitempty" json:"primaryView"`
3939}
4040
4141func (JenkinsJob ) TableName () string {
Original file line number Diff line number Diff line change 1+ package migrationscripts
2+
3+ import (
4+ "github.com/apache/incubator-devlake/core/context"
5+ "github.com/apache/incubator-devlake/core/errors"
6+ "github.com/apache/incubator-devlake/helpers/migrationhelper"
7+ )
8+
9+ type expandPrimaryView struct {}
10+
11+ type JenkinsJob20260602 struct {
12+ PrimaryView string `gorm:"type:text"`
13+ }
14+
15+ func (JenkinsJob20260602 ) TableName () string {
16+ return "_tool_jenkins_jobs"
17+ }
18+
19+ func (u * expandPrimaryView ) Up (baseRes context.BasicRes ) errors.Error {
20+ return migrationhelper .AutoMigrateTables (baseRes , & JenkinsJob20260602 {})
21+ }
22+
23+ func (* expandPrimaryView ) Version () uint64 {
24+ return 20260602000000
25+ }
26+
27+ func (* expandPrimaryView ) Name () string {
28+ return "expand primary_view column to text"
29+ }
Original file line number Diff line number Diff line change @@ -36,5 +36,6 @@ func All() []plugin.MigrationScript {
3636 new (renameTr2ScopeConfig ),
3737 new (addRawParamTableForScope ),
3838 new (addNumberToJenkinsBuildCommit ),
39+ new (expandPrimaryView ),
3940 }
4041}
You can’t perform that action at this time.
0 commit comments