Skip to content

refactor: Emit FutureWarning on nullable primary key #41

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

Merged
merged 1 commit into from
Jun 17, 2025

Conversation

AndreasAlbertQC
Copy link
Collaborator

@AndreasAlbertQC AndreasAlbertQC commented May 23, 2025

Motivation

Closes #13

Changes

  • Added a FutureWarning when a user sets nullable and primary_key at the same time. Since nullable is otherwise quietly ignored, this should raise an error in a future release.
  • refactored warning tests to make it easier to test multiple warnings

Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (ea591aa) to head (001ca4d).
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #41   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           39        39           
  Lines         1890      1895    +5     
=========================================
+ Hits          1890      1895    +5     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@delsner delsner left a comment

Choose a reason for hiding this comment

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

Thanks, makes sense!

@AndreasAlbertQC AndreasAlbertQC merged commit 95d9278 into main Jun 17, 2025
20 checks passed
@AndreasAlbertQC AndreasAlbertQC deleted the no-nullable-pk branch June 17, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nullable=True is ignored if primary_key is True
3 participants