Skip to content

Change report ID columns to BIGINT to avoid 32-bit integer overflow#4936

Merged
bruntib merged 2 commits into
Ericsson:masterfrom
NikhilJeikar:extending-report-id
Jul 9, 2026
Merged

Change report ID columns to BIGINT to avoid 32-bit integer overflow#4936
bruntib merged 2 commits into
Ericsson:masterfrom
NikhilJeikar:extending-report-id

Conversation

@NikhilJeikar

Copy link
Copy Markdown
Contributor

Report IDs were stored as INTEGER (max ~2.1B). Large deployments can hit this limit and fail on insert. Promote reports.id and all report_id FKs to BIGINT on PostgreSQL; SQLite already supports 64-bit integers.

@bruntib bruntib left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the patch. I just have one question during the review.

('bug_path_events', False),
('bug_report_points', False),
('extended_report_data', False),
('report_analysis_info', True),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How can this column be NULL? Couldn't we set all report_id foreign key columns as not nullable?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch. report_id being nullable is not intentional - it was defined that way in the original dabc6998b8f0 migration when report_analysis_info was added, but the application never creates rows without a report_id. If there's no analysis info for a report, no association row is created at all.
I agree we should tighten this. If you want I can do it in this PR or a seperate one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It would be great if this would be redesigned in this PR. Thank you in advance!

@bruntib bruntib merged commit fa13a34 into Ericsson:master Jul 9, 2026
9 checks passed
@bruntib

bruntib commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for the improvement!

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.

2 participants