Closed xlii-chl closed 2 years ago
I will let @lonnieezell handle this one, but at the very least I think the database change should be an additional migration file rather than modifying the current one.
Noted.
Actually, the more I think about it, the less I'm convinced this is the way to go. It would be nice to have boolean fields being actual boolean types, but the difference between the DB storing as 0/1
and PostgreSQL storing as t/f
may bring too much hassle for what it's worth.
Ping me if you'd like to see more, but I'll probably close it soon and focus on #494 otherwise.
I think focusing on #493 is probably the better route here. Thanks.
This pull-request is a little more ambitious than #494 as it changes the database schema. The code change is bigger and more likely to introduce breaking scenario, but since MySQL & MariaDB implictly convert booleans fields to tinyint and since SQLite isn't strongly typed, the impact on existing deployments may still be acceptable.
Those patch set up a new casting class, taking care of the strange behaviour of PDO/PostgreSQL fetching
TRUE
/FALSE
values as(string)'t'
/(string)'f'
by default. For now, this patch is still a work in progress as I would prefer and still hope to usePDO::PARAM_*
.Like #494 :