Skip to content

fix(postgres): widen git_function_blame.symbol_id to Text - #2169

Merged
RaghavChamadiya merged 1 commit into
repowise-dev:mainfrom
Aman-goel-04:fix/git-function-blame-symbol-id-2162
Sep 11, 2026
Merged

RaghavChamadiya merged 1 commit into
repowise-dev:mainfrom
Aman-goel-04:fix/git-function-blame-symbol-id-2162

Conversation

@Aman-goel-04

Copy link
Copy Markdown
Contributor

Summary

Related Issues

Fixes #2162

Test Plan

  • Tests pass (pytest)
  • Lint passes (ruff check .)
  • Web build passes (npm run build) (no frontend changes)

What was done

  • Reproduced the original error locally against Postgres, confirmed the fix resolves it
  • alembic upgrade head / downgrade -1 verified round-trip on a stamped pre-fix schema
  • Added an integration test (tests/integration/test_postgres_git_function_blame_symbol_id.py), confirmed it fails without the fix and passes with it

Checklist

  • My code follows the project's code style
  • I have added tests for new functionality
  • All existing tests still pass
  • I have updated documentation if needed

@RaghavChamadiya RaghavChamadiya left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guarding the migration on the dialect is the right call, and the reason you gave for it is the one that matters: a batch_alter_table on SQLite would rebuild the table to change nothing, since it never enforced the length in the first place. The downgrade refusing to truncate rather than papering over it with left(col, 512) is also right. Integration tests do not run in CI, so the regression test is documentation of the repro for now, which is still worth having next to the migration.

@RaghavChamadiya
RaghavChamadiya merged commit 089cba6 into repowise-dev:main Sep 11, 2026
17 checks passed
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.

[Bug] Postgres schema. 512 chars are not sufficient for git_function_blame.symbol_id column

2 participants