Skip to content

Commit c77916a

Browse files
authored
fix: add missing issues.fix_versions (#8496)
1 parent affed66 commit c77916a

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
*/
17+
18+
package migrationscripts
19+
20+
import (
21+
"github.com/apache/incubator-devlake/core/context"
22+
"github.com/apache/incubator-devlake/core/errors"
23+
"github.com/apache/incubator-devlake/core/plugin"
24+
)
25+
26+
var _ plugin.MigrationScript = (*addIssueFixVerion)(nil)
27+
28+
type addIssueFixVerion struct{}
29+
30+
type issue20250710 struct {
31+
FixVersions string `gorm:"type:text"`
32+
}
33+
34+
func (issue20250710) TableName() string {
35+
return "issues"
36+
}
37+
38+
func (script *addIssueFixVerion) Up(basicRes context.BasicRes) errors.Error {
39+
return basicRes.GetDal().AutoMigrate(new(issue20250710))
40+
}
41+
42+
func (*addIssueFixVerion) Version() uint64 {
43+
return 20250710140418
44+
}
45+
46+
func (*addIssueFixVerion) Name() string {
47+
return "add missing issues.fix_versions"
48+
}

backend/core/models/migrationscripts/register.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,6 @@ func All() []plugin.MigrationScript {
138138
new(createQaTables),
139139
new(increaseCqIssueComponentLength),
140140
new(extendFieldSizeForCq),
141+
new(addIssueFixVerion),
141142
}
142143
}

0 commit comments

Comments
 (0)