SeaQL / sea-orm

🐚 An async & dynamic ORM for Rust
https://www.sea-ql.org/SeaORM/
Apache License 2.0
7.3k stars 513 forks source link

Boolean Support( mariadb ) #437

Open kakarot-dev opened 2 years ago

kakarot-dev commented 2 years ago

sea-orm-cli is generating a type wrongly. When the type should be boolean, it generates the entites as the type i8 That is expected as apparently mariadb stores boolean as integer values inside the database. I wanted to ask if this bug can be fixed, and the cli can produce booleans correctly

Sql statement

 ADD COLUMN `reserved` BOOLEAN NULL
billy1624 commented 2 years ago

Hey @kakarot-dev, thanks!!

Can I also know what version of mariadb you're using?

kakarot-dev commented 2 years ago

Server version: 10.6.5-MariaDB-1:10.6.5+maria~focal

tyt2y3 commented 1 year ago

There might be some way that SeaSchema can soundly detect a BOOLEAN and map it as such