This is an automated email from the ASF dual-hosted git repository.
abeizn 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 e8b8ff9e9 fix(pagerduty): fix errors when deleting connections (#7617)
e8b8ff9e9 is described below
commit e8b8ff9e9ab6eda2a163a20bbee7537ea3650b83
Author: Lynwee <[email protected]>
AuthorDate: Fri Jun 14 10:54:44 2024 +0800
fix(pagerduty): fix errors when deleting connections (#7617)
---
...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),
}
}