php-mysql-engine icon indicating copy to clipboard operation
php-mysql-engine copied to clipboard

Support for BOOLEAN column type

Open SirPL opened this issue 3 years ago • 3 comments

From MySQL perspective the boolean is an alias for tinyint.

SirPL avatar Jun 30 '22 12:06 SirPL

Mind fixing the Psalm errors?

muglug avatar Jun 30 '22 15:06 muglug

I fixed all Psalm issues but one. I understand why Psalm is complaining about $this->getDefault() returning mixed value which is then converted to string. I don't understand why the very same piece of code isn't failing in other Column types, i.e. src/Schema/Column/IntegerColumnTrait.php:63-69.

I would appreciate a helping hand and getting an explanation why I see such discrepancy.

SirPL avatar Jun 30 '22 18:06 SirPL

@SirPL I know it's been a while, so not sure if you still care to work on this, but there's no discrepancy. IntegerColumnTrait is just being explicitly ignored.

I think Psalm should will be satisfied if you just (string) $this->getDefault()?

Kenneth-Sills avatar Jun 27 '24 18:06 Kenneth-Sills