You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/07/07 09:00:13 UTC

[GitHub] [incubator-devlake] likyh commented on a diff in pull request #2442: fix: drop user table

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


##########
plugins/github/models/migrationscripts/register.go:
##########
@@ -25,6 +25,5 @@ import (
 func All() []migration.Script {
 	return []migration.Script{
 		new(initSchemas),
-		new(UpdateSchemas20220620),

Review Comment:
   Is the file deleted actually?



##########
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:
   Is milestone_id added in `archive`?



-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org