fix(jira): change _tool_jira_issues.fix_versions column to text#8988
Open
DoDiODev wants to merge 2 commits into
Open
fix(jira): change _tool_jira_issues.fix_versions column to text#8988DoDiODev wants to merge 2 commits into
DoDiODev wants to merge 2 commits into
Conversation
The `fix_versions` field on the jira issue model is declared as `gorm:"type:text"`, but the original migration (20250619_add_fix_versions_to_issue) created the column as `varchar(255)`. Installations that ran the earlier migration therefore have a `varchar(255)` column that no longer matches the model and truncates long fix version lists. This migration alters `_tool_jira_issues.fix_versions` to `text` so the database schema matches the model definition and can store values longer than 255 characters. Signed-off-by: DoDiODev <DoDiDev@proton.me>
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
The jira issue model declares
FixVersionsasgorm:"type:text", but theoriginal migration
20250619_add_fix_versions_to_issuecreated the_tool_jira_issues.fix_versionscolumn asvarchar(255). Installations thatran the earlier migration end up with a
varchar(255)column that no longermatches the model and truncates long fix-version lists.
This PR adds a follow-up migration that alters
_tool_jira_issues.fix_versionstotext, aligning the database schema withthe model and allowing values longer than 255 characters.
Scope
20260707_change_fix_versions_to_text.go(AutoMigrateTableson_tool_jira_issues).migrationscripts/register.go.Explicitly excluded
type:text).Testing
make migration-script-lintpasses.go vetandgo build ./plugins/jira/...pass.fix_versionscolumn wasvarchar(255); after migration the column istext/longtext, existing data is preserved, and a value longer than 255characters is written and read back unchanged.
Rollback
Revert the commit; the column type change is additive (widening) and does not
drop data.