You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by mi...@apache.org on 2023/05/31 07:25:28 UTC
[incubator-devlake] branch main updated: fix: migration id defined error (#5327)
This is an automated email from the ASF dual-hosted git repository.
mintsweet pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 88890dd82 fix: migration id defined error (#5327)
88890dd82 is described below
commit 88890dd8207abf426cf3965d828caa5c0ec92e10
Author: 青湛 <0x...@gmail.com>
AuthorDate: Wed May 31 15:25:23 2023 +0800
fix: migration id defined error (#5327)
---
backend/plugins/ae/models/migrationscripts/archived/project.go | 2 +-
.../20230322_add_connection_id_to_transformation_rules.go | 4 ++++
backend/plugins/tapd/models/migrationscripts/archived/bug.go | 2 +-
.../plugins/tapd/models/migrationscripts/archived/bug_changelog.go | 2 +-
backend/plugins/tapd/models/migrationscripts/archived/bug_commit.go | 2 +-
.../plugins/tapd/models/migrationscripts/archived/bug_custom_field.go | 2 +-
backend/plugins/tapd/models/migrationscripts/archived/issue.go | 2 +-
backend/plugins/tapd/models/migrationscripts/archived/iteration.go | 2 +-
backend/plugins/tapd/models/migrationscripts/archived/story.go | 2 +-
.../plugins/tapd/models/migrationscripts/archived/story_category.go | 2 +-
.../plugins/tapd/models/migrationscripts/archived/story_changelog.go | 2 +-
.../plugins/tapd/models/migrationscripts/archived/story_commits.go | 2 +-
.../tapd/models/migrationscripts/archived/story_custom_field.go | 2 +-
.../plugins/tapd/models/migrationscripts/archived/sub_workspace.go | 2 +-
backend/plugins/tapd/models/migrationscripts/archived/task.go | 2 +-
.../plugins/tapd/models/migrationscripts/archived/task_changelog.go | 2 +-
backend/plugins/tapd/models/migrationscripts/archived/task_commits.go | 2 +-
.../tapd/models/migrationscripts/archived/task_custom_field.go | 2 +-
.../plugins/tapd/models/migrationscripts/archived/workitem_type.go | 2 +-
backend/plugins/tapd/models/migrationscripts/archived/worklog.go | 2 +-
backend/plugins/tapd/models/migrationscripts/archived/workspace.go | 2 +-
backend/plugins/zentao/models/archived/account.go | 2 +-
backend/plugins/zentao/models/archived/bug.go | 2 +-
backend/plugins/zentao/models/archived/changelog.go | 4 ++--
backend/plugins/zentao/models/archived/department.go | 2 +-
backend/plugins/zentao/models/archived/execution.go | 2 +-
backend/plugins/zentao/models/archived/product.go | 2 +-
backend/plugins/zentao/models/archived/project.go | 2 +-
backend/plugins/zentao/models/archived/story.go | 2 +-
backend/plugins/zentao/models/archived/task.go | 2 +-
30 files changed, 34 insertions(+), 30 deletions(-)
diff --git a/backend/plugins/ae/models/migrationscripts/archived/project.go b/backend/plugins/ae/models/migrationscripts/archived/project.go
index 25c7859c4..784b36b15 100644
--- a/backend/plugins/ae/models/migrationscripts/archived/project.go
+++ b/backend/plugins/ae/models/migrationscripts/archived/project.go
@@ -24,7 +24,7 @@ import (
type AEProject struct {
ConnectionId uint64 `gorm:"primaryKey"`
- Id int `gorm:"primaryKey;type:varchar(255)"`
+ Id int `gorm:"primaryKey;type:varchar(255);autoIncrement:false"`
GitUrl string `gorm:"type:varchar(255);comment:url of the repo in github"`
Priority int
AECreateTime *time.Time
diff --git a/backend/plugins/bitbucket/models/migrationscripts/20230322_add_connection_id_to_transformation_rules.go b/backend/plugins/bitbucket/models/migrationscripts/20230322_add_connection_id_to_transformation_rules.go
index 4d4e0dece..d418c800d 100644
--- a/backend/plugins/bitbucket/models/migrationscripts/20230322_add_connection_id_to_transformation_rules.go
+++ b/backend/plugins/bitbucket/models/migrationscripts/20230322_add_connection_id_to_transformation_rules.go
@@ -40,6 +40,10 @@ func (transformationRule20230322) TableName() string {
return "_tool_bitbucket_transformation_rules"
}
+func (repo20230322) TableName() string {
+ return "_tool_bitbucket_repos"
+}
+
func (u *addConnectionIdToTransformationRule) Up(baseRes context.BasicRes) errors.Error {
err := migrationhelper.AutoMigrateTables(baseRes, &transformationRule20230322{})
if err != nil {
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/bug.go b/backend/plugins/tapd/models/migrationscripts/archived/bug.go
index fe8794afb..24ff4268c 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/bug.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/bug.go
@@ -24,7 +24,7 @@ import (
type TapdBug struct {
ConnectionId uint64 `gorm:"primaryKey"`
- Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT;autoIncrement:false" json:"id,string"`
EpicKey string
Title string `json:"name" gorm:"type:varchar(255)"`
Description string `json:"description"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/bug_changelog.go b/backend/plugins/tapd/models/migrationscripts/archived/bug_changelog.go
index 0b089f846..93dff398f 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/bug_changelog.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/bug_changelog.go
@@ -25,7 +25,7 @@ import (
type TapdBugChangelog struct {
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
WorkspaceId uint64 `gorm:"type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false" json:"id,string"`
BugId uint64 `json:"bug_id,string"`
Author string `json:"author" gorm:"type:varchar(255)"`
Field string `gorm:"primaryKey;type:varchar(255)" json:"field"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/bug_commit.go b/backend/plugins/tapd/models/migrationscripts/archived/bug_commit.go
index df91739ac..780c49352 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/bug_commit.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/bug_commit.go
@@ -25,7 +25,7 @@ import (
type TapdBugCommit struct {
ConnectionId uint64 `gorm:"primaryKey"`
- Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT;autoIncrement:false" json:"id,string"`
UserId string `json:"user_id" gorm:"type:varchar(255)"`
HookUserName string `json:"hook_user_name" gorm:"type:varchar(255)"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/bug_custom_field.go b/backend/plugins/tapd/models/migrationscripts/archived/bug_custom_field.go
index 58992611e..0d1721a4d 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/bug_custom_field.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/bug_custom_field.go
@@ -23,7 +23,7 @@ import (
type TapdBugCustomFields struct {
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false" json:"id,string"`
WorkspaceId uint64 `json:"workspace_id,string"`
EntryType string `json:"entry_type" gorm:"type:varchar(255)"`
CustomField string `json:"custom_field" gorm:"type:varchar(255)"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/issue.go b/backend/plugins/tapd/models/migrationscripts/archived/issue.go
index e5146eb2b..8c090a398 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/issue.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/issue.go
@@ -19,7 +19,7 @@ package archived
type TapdIssue struct {
ConnectionId uint64 `gorm:"primaryKey"`
- Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT;autoIncrement:false" json:"id,string"`
}
func (TapdIssue) TableName() string {
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/iteration.go b/backend/plugins/tapd/models/migrationscripts/archived/iteration.go
index e227d7370..b9960d69f 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/iteration.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/iteration.go
@@ -24,7 +24,7 @@ import (
type TapdIteration struct {
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false" json:"id,string"`
Name string `gorm:"type:varchar(255)" json:"name"`
WorkspaceId uint64 `json:"workspace_id,string"`
Startdate *helper.CSTTime `json:"startdate"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/story.go b/backend/plugins/tapd/models/migrationscripts/archived/story.go
index 0ac04e627..f45012f6c 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/story.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/story.go
@@ -24,7 +24,7 @@ import (
type TapdStory struct {
ConnectionId uint64 `gorm:"primaryKey"`
- Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT;autoIncrement:false" json:"id,string"`
WorkitemTypeId uint64 `json:"workitem_type_id,string"`
Name string `gorm:"type:varchar(255)" json:"name"`
Description string `json:"description"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/story_category.go b/backend/plugins/tapd/models/migrationscripts/archived/story_category.go
index babf81993..eed3379d1 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/story_category.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/story_category.go
@@ -24,7 +24,7 @@ import (
type TapdStoryCategory struct {
ConnectionId uint64 `gorm:"primaryKey"`
- Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT;autoIncrement:false" json:"id,string"`
Name string `json:"name" gorm:"type:varchar(255)"`
Description string `json:"description"`
ParentId uint64 `json:"parent_id,string"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/story_changelog.go b/backend/plugins/tapd/models/migrationscripts/archived/story_changelog.go
index 5a7f2e969..e73db7b7f 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/story_changelog.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/story_changelog.go
@@ -24,7 +24,7 @@ import (
type TapdStoryChangelog struct {
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false" json:"id,string"`
WorkspaceId uint64 `json:"workspace_id,string"`
WorkitemTypeId uint64 `json:"workitem_type_id,string"`
Creator string `json:"creator" gorm:"type:varchar(255)"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/story_commits.go b/backend/plugins/tapd/models/migrationscripts/archived/story_commits.go
index d90f98853..3681c9024 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/story_commits.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/story_commits.go
@@ -25,7 +25,7 @@ import (
type TapdStoryCommit struct {
ConnectionId uint64 `gorm:"primaryKey"`
- Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT;autoIncrement:false" json:"id,string"`
UserId string `json:"user_id" gorm:"type:varchar(255)"`
HookUserName string `json:"hook_user_name" gorm:"type:varchar(255)"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/story_custom_field.go b/backend/plugins/tapd/models/migrationscripts/archived/story_custom_field.go
index 038d845b5..38b13d1f6 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/story_custom_field.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/story_custom_field.go
@@ -23,7 +23,7 @@ import (
type TapdStoryCustomFields struct {
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false" json:"id,string"`
WorkspaceId uint64 `json:"workspace_id,string"`
EntryType string `json:"entry_type" gorm:"type:varchar(255)"`
CustomField string `json:"custom_field" gorm:"type:varchar(255)"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/sub_workspace.go b/backend/plugins/tapd/models/migrationscripts/archived/sub_workspace.go
index af70b1d9d..c24374849 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/sub_workspace.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/sub_workspace.go
@@ -24,7 +24,7 @@ import (
type TapdSubWorkspace struct {
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT;autoIncrement:false" json:"id,string"`
Name string `gorm:"type:varchar(255)" json:"name"`
PrettyName string `gorm:"type:varchar(255)" json:"pretty_name"`
Category string `gorm:"type:varchar(255)" json:"category"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/task.go b/backend/plugins/tapd/models/migrationscripts/archived/task.go
index be6483522..0fe7a5358 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/task.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/task.go
@@ -24,7 +24,7 @@ import (
type TapdTask struct {
ConnectionId uint64 `gorm:"primaryKey"`
- Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT;autoIncrement:false" json:"id,string"`
Name string `gorm:"type:varchar(255)" json:"name"`
Description string `json:"description"`
WorkspaceId uint64 `json:"workspace_id,string"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/task_changelog.go b/backend/plugins/tapd/models/migrationscripts/archived/task_changelog.go
index 5496dae93..3de500342 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/task_changelog.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/task_changelog.go
@@ -24,7 +24,7 @@ import (
type TapdTaskChangelog struct {
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false" json:"id,string"`
WorkspaceId uint64 `json:"workspace_id,string"`
WorkitemTypeId uint64 `json:"workitem_type_id,string"`
Creator string `json:"creator" gorm:"type:varchar(255)"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/task_commits.go b/backend/plugins/tapd/models/migrationscripts/archived/task_commits.go
index 3833c95a9..e6754f5ae 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/task_commits.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/task_commits.go
@@ -25,7 +25,7 @@ import (
type TapdTaskCommit struct {
ConnectionId uint64 `gorm:"primaryKey"`
- Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT;autoIncrement:false" json:"id,string"`
UserId string `json:"user_id" gorm:"type:varchar(255)"`
HookUserName string `json:"hook_user_name" gorm:"type:varchar(255)"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/task_custom_field.go b/backend/plugins/tapd/models/migrationscripts/archived/task_custom_field.go
index bc9abcd10..f695e0751 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/task_custom_field.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/task_custom_field.go
@@ -23,7 +23,7 @@ import (
type TapdTaskCustomFields struct {
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false" json:"id,string"`
WorkspaceId uint64 `json:"workspace_id,string"`
EntryType string `json:"entry_type" gorm:"type:varchar(255)"`
CustomField string `json:"custom_field" gorm:"type:varchar(255)"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/workitem_type.go b/backend/plugins/tapd/models/migrationscripts/archived/workitem_type.go
index 5250602d1..271f2d3b8 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/workitem_type.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/workitem_type.go
@@ -24,7 +24,7 @@ import (
type TapdWorkitemType struct {
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false" json:"id,string"`
WorkspaceId uint64 `json:"workspace_id,string"`
EntityType string `gorm:"type:varchar(255)" json:"entity_type"`
Name string `gorm:"type:varchar(255)" json:"name"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/worklog.go b/backend/plugins/tapd/models/migrationscripts/archived/worklog.go
index f6df75898..d8fc43916 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/worklog.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/worklog.go
@@ -24,7 +24,7 @@ import (
type TapdWorklog struct {
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false" json:"id,string"`
WorkspaceId uint64 `json:"workspace_id,string"`
EntityType string `gorm:"type:varchar(255)" json:"entity_type"`
EntityId uint64 `json:"entity_id,string"`
diff --git a/backend/plugins/tapd/models/migrationscripts/archived/workspace.go b/backend/plugins/tapd/models/migrationscripts/archived/workspace.go
index 0e6f50daf..ad84b87b4 100644
--- a/backend/plugins/tapd/models/migrationscripts/archived/workspace.go
+++ b/backend/plugins/tapd/models/migrationscripts/archived/workspace.go
@@ -24,7 +24,7 @@ import (
type TapdWorkspace struct {
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT;autoIncrement:false" json:"id,string"`
Name string `gorm:"type:varchar(255)" json:"name"`
PrettyName string `gorm:"type:varchar(255)" json:"pretty_name"`
Category string `gorm:"type:varchar(255)" json:"category"`
diff --git a/backend/plugins/zentao/models/archived/account.go b/backend/plugins/zentao/models/archived/account.go
index 62deebb03..464e81be4 100644
--- a/backend/plugins/zentao/models/archived/account.go
+++ b/backend/plugins/zentao/models/archived/account.go
@@ -24,7 +24,7 @@ import (
type ZentaoAccount struct {
archived.NoPKModel
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- ID int64 `json:"id" gorm:"primaryKey;type:BIGINT NOT NULL" `
+ ID int64 `json:"id" gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false" `
Account string `json:"account" gorm:"type:varchar(100);index"`
Avatar string `json:"avatar" gorm:"type:varchar(255)"`
Realname string `json:"realname" gorm:"type:varchar(100);index"`
diff --git a/backend/plugins/zentao/models/archived/bug.go b/backend/plugins/zentao/models/archived/bug.go
index 6767428b6..274c51f4d 100644
--- a/backend/plugins/zentao/models/archived/bug.go
+++ b/backend/plugins/zentao/models/archived/bug.go
@@ -25,7 +25,7 @@ import (
type ZentaoBug struct {
archived.NoPKModel
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- ID int64 `json:"id" gorm:"primaryKey;type:BIGINT NOT NULL"`
+ ID int64 `json:"id" gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false"`
Project int64 `json:"project"`
Product int64 `json:"product"`
Injection int `json:"injection"`
diff --git a/backend/plugins/zentao/models/archived/changelog.go b/backend/plugins/zentao/models/archived/changelog.go
index 249f1b15f..2eddfe970 100644
--- a/backend/plugins/zentao/models/archived/changelog.go
+++ b/backend/plugins/zentao/models/archived/changelog.go
@@ -26,7 +26,7 @@ import (
type ZentaoChangelog struct {
archived.NoPKModel `json:"-"`
ConnectionId uint64 `json:"connectionId" mapstructure:"connectionId" gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id int64 `json:"id" mapstructure:"id" gorm:"primaryKey;type:BIGINT NOT NULL"`
+ Id int64 `json:"id" mapstructure:"id" gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false"`
ObjectId int `json:"objectId" mapstructure:"objectId" gorm:"index; NOT NULL"`
Execution int `json:"execution" mapstructure:"execution" `
Actor string `json:"actor" mapstructure:"actor" `
@@ -49,7 +49,7 @@ func (ZentaoChangelog) TableName() string {
type ZentaoChangelogDetail struct {
archived.NoPKModel `json:"-"`
ConnectionId uint64 `json:"connectionId" mapstructure:"connectionId" gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id int64 `json:"id" mapstructure:"id" gorm:"primaryKey;type:BIGINT NOT NULL"`
+ Id int64 `json:"id" mapstructure:"id" gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false"`
ChangelogId int64 `json:"changelogId" mapstructure:"changelogId" gorm:"primaryKey;type:BIGINT NOT NULL"`
Field string `json:"field" mapstructure:"field"`
Old string `json:"old" mapstructure:"old"`
diff --git a/backend/plugins/zentao/models/archived/department.go b/backend/plugins/zentao/models/archived/department.go
index fd23dd8e4..3c35039c7 100644
--- a/backend/plugins/zentao/models/archived/department.go
+++ b/backend/plugins/zentao/models/archived/department.go
@@ -23,7 +23,7 @@ import (
type ZentaoDepartment struct {
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- ID int64 `json:"id" gorm:"primaryKey;type:BIGINT NOT NULL" `
+ ID int64 `json:"id" gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false" `
Name string `json:"name" gorm:"type:varchar(100);index"`
Parent int `json:"parent" gorm:"type:BIGINT NOT NULL"`
Path string `json:"path" gorm:"type:varchar(100)"`
diff --git a/backend/plugins/zentao/models/archived/execution.go b/backend/plugins/zentao/models/archived/execution.go
index 7706772d9..6fed983be 100644
--- a/backend/plugins/zentao/models/archived/execution.go
+++ b/backend/plugins/zentao/models/archived/execution.go
@@ -24,7 +24,7 @@ import (
type ZentaoExecution struct {
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id int64 `json:"id" gorm:"primaryKey;type:BIGINT NOT NULL"`
+ Id int64 `json:"id" gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false"`
Project int64 `json:"project"`
Model string `json:"model"`
Type string `json:"type"`
diff --git a/backend/plugins/zentao/models/archived/product.go b/backend/plugins/zentao/models/archived/product.go
index 5cac2a11c..d3237d59f 100644
--- a/backend/plugins/zentao/models/archived/product.go
+++ b/backend/plugins/zentao/models/archived/product.go
@@ -25,7 +25,7 @@ import (
type ZentaoProduct struct {
archived.NoPKModel `json:"-"`
ConnectionId uint64 `json:"connectionid" mapstructure:"connectionid" gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id int64 `json:"id" mapstructure:"id" gorm:"primaryKey;type:BIGINT NOT NULL"`
+ Id int64 `json:"id" mapstructure:"id" gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false"`
Program int `json:"program" mapstructure:"program"`
Name string `json:"name" mapstructure:"name"`
Code string `json:"code" mapstructure:"code"`
diff --git a/backend/plugins/zentao/models/archived/project.go b/backend/plugins/zentao/models/archived/project.go
index aaec9cb86..e8aa1eba9 100644
--- a/backend/plugins/zentao/models/archived/project.go
+++ b/backend/plugins/zentao/models/archived/project.go
@@ -25,7 +25,7 @@ import (
type ZentaoProject struct {
common.NoPKModel `json:"-"`
ConnectionId uint64 `json:"connectionid" mapstructure:"connectionid" gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id int64 `json:"id" mapstructure:"id" gorm:"primaryKey;type:BIGINT NOT NULL"`
+ Id int64 `json:"id" mapstructure:"id" gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false"`
Project int64 `json:"project" mapstructure:"project"`
Model string `json:"model" mapstructure:"model"`
Type string `json:"type" mapstructure:"type"`
diff --git a/backend/plugins/zentao/models/archived/story.go b/backend/plugins/zentao/models/archived/story.go
index 7fee5e392..623025d7a 100644
--- a/backend/plugins/zentao/models/archived/story.go
+++ b/backend/plugins/zentao/models/archived/story.go
@@ -25,7 +25,7 @@ import (
type ZentaoStory struct {
archived.NoPKModel
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- ID int64 `json:"id" gorm:"primaryKey;type:BIGINT NOT NULL" `
+ ID int64 `json:"id" gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false" `
Project int64 `json:"project"`
Product int64 `json:"product"`
Branch int `json:"branch"`
diff --git a/backend/plugins/zentao/models/archived/task.go b/backend/plugins/zentao/models/archived/task.go
index a6bc9a232..5835380e7 100644
--- a/backend/plugins/zentao/models/archived/task.go
+++ b/backend/plugins/zentao/models/archived/task.go
@@ -25,7 +25,7 @@ import (
type ZentaoTask struct {
archived.NoPKModel
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- ID int64 `json:"id" gorm:"primaryKey;type:BIGINT NOT NULL"`
+ ID int64 `json:"id" gorm:"primaryKey;type:BIGINT NOT NULL;autoIncrement:false"`
Project int64 `json:"project"`
Parent int64 `json:"parent"`
Execution int64 `json:"execution"`