This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch fix-migration-version
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/fix-migration-version by this
push:
new 5fabb2636 fix: pr reviewers and assignees script version error
5fabb2636 is described below
commit 5fabb26365b041ffd3ae25656d253d2163f5b906
Author: abeizn <[email protected]>
AuthorDate: Fri Jun 21 09:20:44 2024 +0800
fix: pr reviewers and assignees script version error
---
.../20240531_add_pr_assignees_and_reviewers.go | 2 +-
.../20240607_modify_pr_assignees_and_reviewers_id.go | 14 ++++++++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git
a/backend/core/models/migrationscripts/20240531_add_pr_assignees_and_reviewers.go
b/backend/core/models/migrationscripts/20240531_add_pr_assignees_and_reviewers.go
index fa852c960..d7cbd9f9f 100644
---
a/backend/core/models/migrationscripts/20240531_add_pr_assignees_and_reviewers.go
+++
b/backend/core/models/migrationscripts/20240531_add_pr_assignees_and_reviewers.go
@@ -35,7 +35,7 @@ func (u *addPrAssigneeAndReviewer) Up(basicRes
context.BasicRes) errors.Error {
}
func (*addPrAssigneeAndReviewer) Version() uint64 {
- return 20250531000041
+ return 20240531000041
}
func (*addPrAssigneeAndReviewer) Name() string {
diff --git
a/backend/core/models/migrationscripts/20240607_modify_pr_assignees_and_reviewers_id.go
b/backend/core/models/migrationscripts/20240607_modify_pr_assignees_and_reviewers_id.go
index adfe318ed..ad8f890cd 100644
---
a/backend/core/models/migrationscripts/20240607_modify_pr_assignees_and_reviewers_id.go
+++
b/backend/core/models/migrationscripts/20240607_modify_pr_assignees_and_reviewers_id.go
@@ -28,7 +28,17 @@ type modifyPrAssigneeAndReviewerId struct{}
func (u *modifyPrAssigneeAndReviewerId) Up(basicRes context.BasicRes)
errors.Error {
db := basicRes.GetDal()
- err := db.DropTables(&archived.PullRequestAssignee{},
&archived.PullRequestReviewer{})
+ err := db.Exec(`delete from _devlake_migration_history
+ where script_version="20250531000041" and
script_name="add pull_request_reviewers and pull_request_assignees tables"`)
+ if err != nil {
+ return err
+ }
+ err = db.Exec(`delete from _devlake_migration_history
+ where script_version="20250607000041" and
script_name="modify pull_request_reviewers and pull_request_assignees id
columns"`)
+ if err != nil {
+ return err
+ }
+ err = db.DropTables(&archived.PullRequestAssignee{},
&archived.PullRequestReviewer{})
if err != nil {
return err
}
@@ -40,7 +50,7 @@ func (u *modifyPrAssigneeAndReviewerId) Up(basicRes
context.BasicRes) errors.Err
}
func (*modifyPrAssigneeAndReviewerId) Version() uint64 {
- return 20250607000041
+ return 20240607000041
}
func (*modifyPrAssigneeAndReviewerId) Name() string {