Skip to content

fix(jira): change _tool_jira_issues.fix_versions column to text#8988

Open
DoDiODev wants to merge 2 commits into
apache:mainfrom
DoDiODev:pr/jira-fix-versions-text
Open

fix(jira): change _tool_jira_issues.fix_versions column to text#8988
DoDiODev wants to merge 2 commits into
apache:mainfrom
DoDiODev:pr/jira-fix-versions-text

Conversation

@DoDiODev

Copy link
Copy Markdown
Contributor

Summary

The jira issue model declares FixVersions as gorm:"type:text", but the
original migration 20250619_add_fix_versions_to_issue created the
_tool_jira_issues.fix_versions column as varchar(255). Installations that
ran the earlier migration end up with a varchar(255) column that no longer
matches the model and truncates long fix-version lists.

This PR adds a follow-up migration that alters
_tool_jira_issues.fix_versions to text, aligning the database schema with
the model and allowing values longer than 255 characters.

Scope

  • New migration 20260707_change_fix_versions_to_text.go (AutoMigrateTables on _tool_jira_issues).
  • Registration of the migration in the jira migrationscripts/register.go.

Explicitly excluded

  • No Grafana dashboard changes.
  • No jira model changes (the model already declares type:text).

Testing

  • make migration-script-lint passes.
  • go vet and go build ./plugins/jira/... pass.
  • Manual DB gate on MySQL and PostgreSQL: upgraded a schema whose
    fix_versions column was varchar(255); after migration the column is
    text/longtext, existing data is preserved, and a value longer than 255
    characters is written and read back unchanged.

Rollback

Revert the commit; the column type change is additive (widening) and does not
drop data.

DoDiODev added 2 commits July 14, 2026 14:14
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant