Open JoaoPortella opened 5 years ago
Are you using mysql? In mysql if you define a column as tinyint(1) this is how it handles boolean and therefore it will be converted to boolean on the migration file.
@cacpmw thank you! Yes. I use tinyint not to save boolean data, but numbers from 1 to 10. And tinyInteger is available in Laravel schemas.
@JoaoPortella Then if you are using tinyint(1) shouldn't you only be able to do 0-9?...
@theWebKeyGuy I did not try to use as boolean, just changed to tinyint
Joao is correct - this is a nasty bug.
Just because Laravel maps boolean to tinyint in MySQL, one should not assume that ALL tinyint fields in MySql are meant to be booleans. It is common practice to use one as a signed status field where the range of values are below 100.
The tinyint field is being converted to boolean when it should be tinyInteger.
Excellent tool! thank you!