Repository navigation
🐛 Fix setting nullable property of Fields that don't accept None - #79
Conversation
|
^ I agree, I think this the query generated by this PR is more correct. |
Codecov Report
@@ Coverage Diff @@
## main #79 +/- ##
=======================================
Coverage 97.58% 97.59%
=======================================
Files 182 182
Lines 6054 6060 +6
=======================================
+ Hits 5908 5914 +6
Misses 146 146
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
📝 Docs preview for commit 2877c12 at: https://630a97760a0b955025267d1a--sqlmodel.netlify.app |
None
|
📝 Docs preview for commit 33daef3 at: https://630a97d81b8fa54cf7654d6b--sqlmodel.netlify.app |
|
Awesome, thank you @van51! Great work! 🚀 🍰 And thanks @highflyingaction for the review and for spotting something to update! 🤓 Thanks everyone for the discussion. This will be available in the next version released in the next hours, SQLModel |
Attempt to fix #76 where fields with default values would be considered nullable by sqlmodel, because they would be treated as
not_requiredby Pydantic.Previously
The following example code (copy-pasted from the issue)
used to produce the following create table SQL command:
Now
This PR produces:
Please let me know what you think.