sea-orm icon indicating copy to clipboard operation
sea-orm copied to clipboard

Boolean Support( mariadb )

Open kakarot-dev opened this issue 4 years ago • 3 comments

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

kakarot-dev avatar Jan 08 '22 05:01 kakarot-dev

Hey @kakarot-dev, thanks!!

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

billy1624 avatar Jan 08 '22 05:01 billy1624

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

kakarot-dev avatar Jan 08 '22 07:01 kakarot-dev

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

tyt2y3 avatar Feb 21 '23 10:02 tyt2y3