You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2022/08/08 02:10:55 UTC

[incubator-devlake] branch release-v0.12 updated: fix: devlake_blueprints settings does exist

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

abeizn pushed a commit to branch release-v0.12
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/release-v0.12 by this push:
     new 6737a706 fix: devlake_blueprints settings does exist
6737a706 is described below

commit 6737a7063a66d8261dcac14adb6bcbf86721c9e7
Author: abeizn <zi...@merico.dev>
AuthorDate: Mon Aug 8 10:05:16 2022 +0800

    fix: devlake_blueprints settings does exist
---
 models/migrationscripts/20220622_rename_tasks_to_plan.go | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/models/migrationscripts/20220622_rename_tasks_to_plan.go b/models/migrationscripts/20220622_rename_tasks_to_plan.go
index 9e0cc476..07592a8c 100644
--- a/models/migrationscripts/20220622_rename_tasks_to_plan.go
+++ b/models/migrationscripts/20220622_rename_tasks_to_plan.go
@@ -45,7 +45,11 @@ func (blueprintNormalMode_Pipeline) TableName() string {
 type renameTasksToPlan struct{}
 
 func (*renameTasksToPlan) Up(ctx context.Context, db *gorm.DB) error {
-	err := db.Migrator().RenameColumn(&blueprintNormalMode_Blueprint{}, "tasks", "plan")
+	err := db.Migrator().AddColumn(blueprintNormalMode_Blueprint{}, "settings")
+	if err != nil {
+		return err
+	}
+	err = db.Migrator().RenameColumn(&blueprintNormalMode_Blueprint{}, "tasks", "plan")
 	if err != nil {
 		return err
 	}