-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Update SQLite backend Boolean type from int to bool #400
Conversation
- Add test for bool column for table creation in SQLite - Add test for inserting boolean values in SQLite
Renamed "bool" to "boolean" Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
Context: Hey @anshul#9329, if you look at the rules of type affinity
https://www.sqlite.org/datatype3.html#determination_of_column_affinity The column defined with I prefer
|
@billy1624 Thanks you for explaining. I'd totally missed this part of the table. I've already renamed it to |
I think it's all good! After this PR is being merged, we should mention this bareaking change in the CHANGELOG. This PR should fix the original issue - #375 - once we bumped the SeaORM version on SeaSchema side. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for contributing!! @anshulxyz
@billy1624 should we make fix in sea-schema? |
According to my understanding, it will 'just work' with SeaSchema. Am I right? |
Hey @tyt2y3, correct! |
As mentioned in #375 the SQLite engine already supports boolean type implicitly. More details are provided in the issue's comments about this.
PR Info
Adds
Breaking Changes
boolean
, until now we were usingint
there. So in case, someone makes an update, and they provide and int where we expect a bool, it might break some code. This still needs to be checked.i32
toboolean
.Changes