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

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


The following commit(s) were added to refs/heads/release-v1.0 by this push:
     new d4eeb24a8 fix(pagerduty): fix errors when deleting connections (#7617) 
(#7618)
d4eeb24a8 is described below

commit d4eeb24a806def66cd9576167735d66f19642d70
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Jun 14 10:55:25 2024 +0800

    fix(pagerduty): fix errors when deleting connections (#7617) (#7618)
    
    Co-authored-by: Lynwee <[email protected]>
---
 ...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),
        }
 }

Reply via email to