Repository navigation
fix(invoices): store time_entry_ids as text - #867
Merged
evilguy4000 merged 2 commits intoNov 10, 2026
Merged
evilguy4000 merged 2 commits into
evilguy4000 merged 2 commits into
Conversation
A grouped invoice line joins every entry id, so about 100 entries overflowed VARCHAR(500) and generation failed on PostgreSQL.
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.
Description
Generating an invoice from about 100 or more time entries returned a 500 on PostgreSQL:
value too long for type character varying(500). A grouped line stores every entry id joined with commas ininvoice_items.time_entry_ids, and grouped is the default. SQLite doesn't enforce the length, so only PostgreSQL deployments hit it.The column is now
Text, with a migration.On PostgreSQL 16, an invoice from 160 entries returned 500 before, and after changing the column it created the grouped line.
flask db upgradeanddowngradeboth run on the new migration.Type of change
Checklist
pytest). (Not run in full, too heavy for this laptop.)