Jira issue originally created by user thinkscape:
Given the following db table connected with an ORM entity:
CREATE TABLE `foo` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`bitField` bit(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Running something like orm:validate-schema will result in the following exception.
Unknown database type bit requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.
BIT datatype is available since mysql 5.0.3 but D2 Mysql platform doesn't seem to understand it
Comment created by @ocramius:
[~thinkscape] the platforms only support base types (common to all platforms) out of the box. If you want additional types, you need to register them.
Comment created by thinkscape:
It seems that BIT(M) column represents packed bits and is not directly transferable to "boolean", nor to (unpacked) "binary" d2 types. This leaves this column type in an awkward position, where no d2 built-in type matches it perfectly. Mapping it to "boolean" limits its scope and could result in data loss. Mapping it to "binary" could result in unexpected behavior.
Right now, the only 2 valid solutions I see are:
Issue was closed with resolution "Won't Fix"