为什么使用 TYPO3 smallint(5) 而不是 tinyint(1) 在数据库中存储 BOOLEAN 值?

Why uses TYPO3 smallint(5) instead of tinyint(1) for storing BOOLEAN values in database?

在 TYPO3 8.7.x MySQL-数据库中布尔值的数据类型是 smallint(5),我想知道为什么它不是 tinyint(1)。例如“已删除”和“隐藏”等字段。那么,是否有充分的理由不使用 tinyint(1) 在我自己的扩展中存储布尔值?

我也有同样的问题。似乎 tinyint 是 MySQL 特定的。 Doctrine dbal 将其映射到 smallint 以成为 db 不可知论者。 (在 Slack 上学习,感谢 Christian Kuhn!)

smallint 是有符号整数,而 tinyint 是无符号整数,根据 Doctrine's documentation:

Not all of the database vendors support unsigned integers, so such an assumption might not be propagated to the database.