-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: increase max URL length (#7493)
Supports longer azure devops organisaion names
- Loading branch information
Showing
5 changed files
with
142 additions
and
2 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
...d/core/models/migrationscripts/20240521_modify_cicd_deployment_commits_repo_url_length.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = (*modifyCicdDeploymentCommitsRepoUrlLength)(nil) | ||
|
||
type modifyCicdDeploymentCommitsRepoUrlLength struct{} | ||
|
||
type cicdDeploymentCommitsRepoUrl20240521 struct { | ||
RepoUrl string `gorm:"type:varchar(500)"` | ||
} | ||
|
||
func (cicdDeploymentCommitsRepoUrl20240521) TableName() string { | ||
return "cicd_deployment_commits" | ||
} | ||
|
||
func (*modifyCicdDeploymentCommitsRepoUrlLength) Up(basicRes context.BasicRes) errors.Error { | ||
return basicRes.GetDal().AutoMigrate(&cicdDeploymentCommitsRepoUrl20240521{}) | ||
} | ||
|
||
func (*modifyCicdDeploymentCommitsRepoUrlLength) Version() uint64 { | ||
return 20240521200500 | ||
} | ||
|
||
func (*modifyCicdDeploymentCommitsRepoUrlLength) Name() string { | ||
return "modify cicd_deployment_commits repo_url from 191 to 500" | ||
} |
48 changes: 48 additions & 0 deletions
48
...end/core/models/migrationscripts/20240521_modify_cicd_pipeline_commits_repo_url_length.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = (*modifyCicdPipelineCommitsRepoUrlLength)(nil) | ||
|
||
type modifyCicdPipelineCommitsRepoUrlLength struct{} | ||
|
||
type cicdPipelineCommitsRepoUrl20240521 struct { | ||
RepoUrl string `gorm:"type:varchar(500)"` | ||
} | ||
|
||
func (cicdPipelineCommitsRepoUrl20240521) TableName() string { | ||
return "cicd_pipeline_commits" | ||
} | ||
|
||
func (*modifyCicdPipelineCommitsRepoUrlLength) Up(basicRes context.BasicRes) errors.Error { | ||
return basicRes.GetDal().AutoMigrate(&cicdPipelineCommitsRepoUrl20240521{}) | ||
} | ||
|
||
func (*modifyCicdPipelineCommitsRepoUrlLength) Version() uint64 { | ||
return 20240521201000 | ||
} | ||
|
||
func (*modifyCicdPipelineCommitsRepoUrlLength) Name() string { | ||
return "modify cicd_pipeline_commits repo_url from 255 to 500" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters