Fix/#8994 - #9013
Open
bujjibabukatta wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
@klesh can you please review and approve ? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #8994. Several
componentcolumns across the domain and tool layers were stillvarchar(N)instead oftext, causing potential truncation and inconsistency with the rest of the codebase, wherecomponenthas already been standardized totextfor issue-tracking tables.Changes
Struct type changes (
Componentfield →text):core/models/domainlayer/code/pull_request.gocore/models/domainlayer/ticket/incident.gocore/models/domainlayer/codequality/cq_issues.goplugins/gitlab/models/mr.goplugins/bitbucket/models/pr.goplugins/bitbucket_server/models/pr.goplugins/gitee/models/pull_request.goplugins/github/models/pr.goplugins/sonarqube/models/sonarqube_hotspot.go(also drops the now-unnecessary index oncomponent, since atextcolumn can't be indexed the same way asvarchar)New migration scripts (8), one per affected table, each calling
ModifyColumnTypeto alter the column at the DB level for existing installations:core/models/migrationscripts/20260722_change_pull_request_component_to_text.gocore/models/migrationscripts/20260722_change_incident_component_to_text.goplugins/gitlab/models/migrationscripts/20260722_change_mr_component_to_text.goplugins/bitbucket/models/migrationscripts/20260722_change_pr_component_to_text.goplugins/bitbucket_server/models/migrationscripts/20260722_change_pr_component_to_text.goplugins/gitee/models/migrationscripts/20260722_change_pr_component_to_text.goplugins/github/models/migrationscripts/20260722_change_pr_component_to_text.goplugins/sonarqube/models/migrationscripts/20260722_change_hotspot_component_to_text.go(drops thecomponentindex before altering the column type)Registered each new migration script in its corresponding
register.go.Testing
go build ./...passes cleanly.texttype for all 9 affected models.TableName().