I do not want to be picky but why the moment you define a table column to be boolean the very next moment you try to get back table structure it is returned as tinyint(1)?
So for as for a table created with
CREATE TABLE IF NOT EXISTS `test` (
`aField` BOOLEAN DEFAULT true
);
The moment I try to get it's structure with
SHOW COLUMNS FROM test
I got
+--------+------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+------------+------+-----+---------+-------+
| aField | tinyint(1) | YES | | 1 | |
+--------+------------+------+-----+---------+-------+
I have not (a big) problem with the fact that a boolean is stored as a tinyint(1) but I have a problem with the fact that the moment you see a tinyint(1) you do not know if that was originally created as a boolean or as a tiny int to store small number range. I saw MySQL documentation ( https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html ) saying that
BOOL, BOOLEAN These types are synonyms for TINYINT(1)
but I disagree for the above mentioned problem.
Is there any other query I can run that will return me the original (boolean) type of the field?