php-crud-api
php-crud-api copied to clipboard
Allow tinyint(1) to be configured as number, not boolean
I have a table with a tinyint(1) column containing values from 0-2. But all entries are transformed in true/false. I understand why it is transformed into a boolean, because most of the time this datatype is used to represent booleans, but i just want to store values from 0-2 ...
Is there any config i can set so this column is interpreted as number?
Thank you for creating this issue. This is a very good question.
Is there any config i can set so this column is interpreted as number?
No currently there is not, changing the type or display (!) width is your best option I guess.
changing it to tinyint(2) is a working workaround
Great workaround, I'm glad that it works for you.
Nevertheless, I'm keeping this ticket open as a feature request.