Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 5789 - catching database exceptions not supposed to happen #5799

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Due to approximate app versions using database version numbers back and forth, there are database incoherences in some app install.
  • That PR is a fix that prevents the app from crashing at startup.

Fixes bug(s)

Fixes: #5789

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 7.07%. Comparing base (4d9c7fc) to head (aaf3a05).
Report is 427 commits behind head on develop.

Files with missing lines Patch % Lines
...ages/smooth_app/lib/database/dao_osm_location.dart 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5799      +/-   ##
==========================================
- Coverage     9.54%   7.07%   -2.48%     
==========================================
  Files          325     411      +86     
  Lines        16411   22243    +5832     
==========================================
+ Hits          1567    1574       +7     
- Misses       14844   20669    +5825     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@g123k g123k left a comment

Choose a reason for hiding this comment

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

Seems OK, but I wonder if we shoudn't add a reminder to remove this code in a few weeks, when new versions will be released

@monsieurtanuki monsieurtanuki merged commit 0ec7dec into openfoodfacts:develop Nov 6, 2024
6 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @g123k for your review!

Seems OK, but I wonder if we shoudn't add a reminder to remove this code in a few weeks, when new versions will be released

It doesn't hurt to have ugly code now and then, especially with non ambiguous comments. And as the bug is a crash at startup and you can never be sure when a user actually updates the app, I think we should live with that stupid code forever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Fatal DB Error, duplicate column name
3 participants