Andy Andy - 1 month ago 12
MySQL Question

phpmyadmin won't change MySQL TINYINT(1) to BOOLEAN data type

I'm running MySQL 5.5.47 and have a number of database tables that have columns with a data type of

TINYINT(1)
. I'm attempting to change these to
BOOLEAN
but it won't change them.

Using phpmyadmin 4.6.0 then going to Structure I'm using the dropdown to set the columns to
BOOLEAN
. This executes the following query:

ALTER TABLE `feedback` CHANGE `tick_receive_updates` `tick_receive_updates` BOOLEAN NOT NULL;


The query runs successfully.

When I view the Structure it does not update: the columns are still marked as being
TINYINT(1)


At first I thought this was a phpmyadmin bug so I ran

DESCRIBE feedback;


Unfortunately the problem remains - columns have not changed from
TINYINT(1)


Why is this?

Answer

This is normal behavior as BOOLEAN is just a synonym of TINYINT(1)

MySQL 5.7 Reference Manual - 12.1.1 Numeric Type Overview

BOOL, BOOLEAN

These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true: