PostgreSQL support - proposal n.2: change tinyint to bools in database schema #495
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 :