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

[incubator-devlake] 03/03: fix: add pipeline_projects_tables and fix common import and fix pipelineRelationship primaryKey

This is an automated email from the ASF dual-hosted git repository.

warren pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 4d674d089992bd712cce8265bc791b5784d1a8e3
Author: abeizn <zi...@merico.dev>
AuthorDate: Wed Sep 7 16:27:48 2022 +0800

    fix: add pipeline_projects_tables and fix common import and fix pipelineRelationship primaryKey
---
 .../20220905_modfiy_cicd_pipeline.go               | 34 +++++++++++-----------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/models/migrationscripts/20220905_modfiy_cicd_pipeline.go b/models/migrationscripts/20220905_modfiy_cicd_pipeline.go
index 7b28edc5..934f261c 100644
--- a/models/migrationscripts/20220905_modfiy_cicd_pipeline.go
+++ b/models/migrationscripts/20220905_modfiy_cicd_pipeline.go
@@ -27,23 +27,23 @@ import (
 type modifyPipeline struct{}
 
 func (*modifyPipeline) Up(ctx context.Context, db *gorm.DB) error {
-	// err := db.Migrator().DropColumn(CICDPipeline0905{}, "commit_sha")
-	// if err != nil {
-	// 	return err
-	// }
-	// err = db.Migrator().DropColumn(CICDPipeline0905{}, "branch")
-	// if err != nil {
-	// 	return err
-	// }
-	// err = db.Migrator().DropColumn(CICDPipeline0905{}, "repo")
-	// if err != nil {
-	// 	return err
-	// }
-	// err = db.Migrator().RenameColumn(CICDPipelineRepo0905{}, "repo_url", "repo")
-	// if err != nil {
-	// 	return err
-	// }
-	err := db.Migrator().AutoMigrate(CICDPipelineRelationship0905{})
+	err := db.Migrator().DropColumn(CICDPipeline0905{}, "commit_sha")
+	if err != nil {
+		return err
+	}
+	err = db.Migrator().DropColumn(CICDPipeline0905{}, "branch")
+	if err != nil {
+		return err
+	}
+	err = db.Migrator().DropColumn(CICDPipeline0905{}, "repo")
+	if err != nil {
+		return err
+	}
+	err = db.Migrator().RenameColumn(CICDPipelineRepo0905{}, "repo_url", "repo")
+	if err != nil {
+		return err
+	}
+	err = db.Migrator().AutoMigrate(CICDPipelineRelationship0905{})
 	if err != nil {
 		return err
 	}