Closed zhaozhenxiang closed 3 months ago
Hello. I submitted the code to allow users to define conversion rules
Hi @zhaozhenxiang , thanks for the PR.
I have considered this previously and I have choose to use boolean
over tinyint
for the following reason:
BOOL
, BOOLEAN
are synonyms for TINYINT(1)
.TINYINT(1)
as $column->tinyInteger(...)
, the migrated column type would be TINYTINT(4)
, or TINYINT(3)
if unsigned, we can't get TINYINT(1)
back.I believe it is a common pattern in MySQL to treat TINYINT(1)
as BOOL
. And the migrations generator should generate migrations identical to the existing database, in which, TINYINT(1)
should be generated as TINYINT(1)
.
do not break types. tinyint(1) not meaning bool