You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ly...@apache.org on 2024/06/14 02:44:12 UTC
(incubator-devlake) branch dev0614 created (now 83df27453)
This is an automated email from the ASF dual-hosted git repository.
lynwee pushed a change to branch dev0614
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
at 83df27453 fix(pagerduty): fix errors when deleting connections
This branch includes the following new commits:
new 83df27453 fix(pagerduty): fix errors when deleting connections
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(incubator-devlake) 01/01: fix(pagerduty): fix errors when deleting connections
Posted by ly...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lynwee pushed a commit to branch dev0614
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 83df27453c9fc657a8881e1696e5266396cf9630
Author: d4x1 <15...@qq.com>
AuthorDate: Fri Jun 14 10:43:37 2024 +0800
fix(pagerduty): fix errors when deleting connections
---
...d_new_fields_to_tool_pagerduty_scope_configs.go | 48 ++++++++++++++++++++++
.../pagerduty/models/migrationscripts/register.go | 1 +
2 files changed, 49 insertions(+)
diff --git a/backend/plugins/pagerduty/models/migrationscripts/20240614_add_new_fields_to_tool_pagerduty_scope_configs.go b/backend/plugins/pagerduty/models/migrationscripts/20240614_add_new_fields_to_tool_pagerduty_scope_configs.go
new file mode 100644
index 000000000..df66601fb
--- /dev/null
+++ b/backend/plugins/pagerduty/models/migrationscripts/20240614_add_new_fields_to_tool_pagerduty_scope_configs.go
@@ -0,0 +1,48 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package migrationscripts
+
+import (
+ "github.com/apache/incubator-devlake/core/context"
+ "github.com/apache/incubator-devlake/core/errors"
+ "github.com/apache/incubator-devlake/core/plugin"
+)
+
+var _ plugin.MigrationScript = (*addPagerDutyScopeConfig20240614)(nil)
+
+type PagerDutyScopeConfig20240614 struct {
+ ConnectionId uint64 `json:"connectionId" gorm:"index" validate:"required" mapstructure:"connectionId,omitempty"`
+}
+
+func (o PagerDutyScopeConfig20240614) TableName() string {
+ return "_tool_pagerduty_scope_configs"
+}
+
+type addPagerDutyScopeConfig20240614 struct{}
+
+func (script *addPagerDutyScopeConfig20240614) Up(basicRes context.BasicRes) errors.Error {
+ return basicRes.GetDal().AutoMigrate(&PagerDutyScopeConfig20240614{})
+}
+
+func (*addPagerDutyScopeConfig20240614) Version() uint64 {
+ return 20240614104000
+}
+
+func (script *addPagerDutyScopeConfig20240614) Name() string {
+ return "add missing fields to table _tool_pagerduty_scope_configs"
+}
diff --git a/backend/plugins/pagerduty/models/migrationscripts/register.go b/backend/plugins/pagerduty/models/migrationscripts/register.go
index 4cfdc69ef..a186f8cb0 100644
--- a/backend/plugins/pagerduty/models/migrationscripts/register.go
+++ b/backend/plugins/pagerduty/models/migrationscripts/register.go
@@ -33,5 +33,6 @@ func All() []plugin.MigrationScript {
new(addRawParamTableForScope),
new(addIncidentPriority),
new(addPagerDutyScopeConfig20231214),
+ new(addPagerDutyScopeConfig20240614),
}
}