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/01 03:09:19 UTC

[GitHub] [incubator-devlake] klesh commented on a diff in pull request #2396: fix: gitlab users are not appeared in table.users

klesh commented on code in PR #2396:
URL: https://github.com/apache/incubator-devlake/pull/2396#discussion_r911580459


##########
plugins/gitlab/models/migrationscripts/archived/user.go:
##########
@@ -20,9 +20,16 @@ package archived
 import "github.com/apache/incubator-devlake/models/migrationscripts/archived"
 
 type GitlabUser struct {
-	ConnectionId uint64 `gorm:"primaryKey"`
-	Email        string `gorm:"primaryKey;type:varchar(255)"`
-	Name         string `gorm:"type:varchar(255)"`
+	ConnectionId    uint64 `gorm:"primaryKey"`
+	ProjectId       int    `gorm:"primaryKey"`

Review Comment:
   This should be a Many-to-Many relationship



##########
plugins/gitlab/models/user.go:
##########
@@ -17,12 +17,21 @@ limitations under the License.
 
 package models
 
-import "github.com/apache/incubator-devlake/models/common"
+import (
+	"github.com/apache/incubator-devlake/models/common"
+)
 
 type GitlabUser struct {
-	ConnectionId uint64 `gorm:"primaryKey"`
-	Email        string `gorm:"primaryKey;type:varchar(255)"`
-	Name         string `gorm:"type:varchar(255)"`
+	ConnectionId    uint64 `gorm:"primaryKey"`
+	ProjectId       int    `gorm:"primaryKey"`

Review Comment:
   Same as above



-- 
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