abeizn commented on code in PR #2442:
URL: https://github.com/apache/incubator-devlake/pull/2442#discussion_r915639031


##########
plugins/github/models/migrationscripts/archived/milestone.go:
##########
@@ -15,59 +15,30 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 */
 
-package migrationscripts
+package archived
 
 import (
-       "context"
-       "github.com/apache/incubator-devlake/models/migrationscripts/archived"
-       "gorm.io/gorm"
        "time"
+
+       "github.com/apache/incubator-devlake/models/migrationscripts/archived"
 )
 
-// GithubMilestone20220620 new struct for milestones
-type GithubMilestone20220620 struct {
-       archived.NoPKModel
+type GithubMilestone struct {
        ConnectionId uint64 `gorm:"primaryKey"`
        MilestoneId  int    `gorm:"primaryKey;autoIncrement:false"`
        RepoId       int
        Number       int
        URL          string
+       Title        string
        OpenIssues   int
        ClosedIssues int
        State        string
-       Title        string
        CreatedAt    time.Time
        UpdatedAt    time.Time
-       ClosedAt     time.Time
-}
-
-// GithubIssue20220620 new field for models.GithubIssue
-type GithubIssue20220620 struct {
-       MilestoneId int
+       ClosedAt     *time.Time
+       archived.NoPKModel
 }
 
-type UpdateSchemas20220620 struct{}
-
-func (GithubMilestone20220620) TableName() string {
+func (GithubMilestone) TableName() string {
        return "_tool_github_milestones"
 }
-
-func (GithubIssue20220620) TableName() string {
-       return "_tool_github_issues"
-}
-
-func (*UpdateSchemas20220620) Up(_ context.Context, db *gorm.DB) error {
-       err := db.Migrator().AddColumn(GithubIssue20220620{}, "milestone_id")

Review Comment:
   updated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to