# MySQL creating "boolean" columns as "bit(1)" instead of "tinyint(1)"

**URL:** <https://forum.liquibase.org/t/mysql-creating-boolean-columns-as-bit-1-instead-of-tinyint-1/2744>\
**Category:** General Discussion\
**Created:** [November 6, 2013, 9:43pm UTC](https://forum.liquibase.org/t/mysql-creating-boolean-columns-as-bit-1-instead-of-tinyint-1/2744 "2013-11-06T21:43:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![barry](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@barry](https://forum.liquibase.org/u/barry)\
**Post date:** [November 6, 2013, 9:43pm UTC](https://forum.liquibase.org/t/mysql-creating-boolean-columns-as-bit-1-instead-of-tinyint-1/2744/1 "2013-11-06T21:43:00Z")

</div>

With Liquibase 2.x, Liquibase would create columns configured as type=“BOOLEAN” in the changelogs as “tinyint(1)” for MySQL. Since upgrading to Liquibase 3.x, it is creating those columns as “bit(1)”.

I didn’t see anything about this in the upgrade notes - is this an intended behaviour change?

The relevant line is here:&nbsp;[https://github.com/liquibase/liquibase/blob/master/liquibase-core/src/main/java/liquibase/datatype/core/BooleanType.java#L34](https://github.com/liquibase/liquibase/blob/master/liquibase-core/src/main/java/liquibase/datatype/core/BooleanType.java#L34)

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [November 6, 2013, 9:43pm UTC](https://forum.liquibase.org/t/mysql-creating-boolean-columns-as-bit-1-instead-of-tinyint-1/2744/2 "2013-11-06T21:43:00Z")

</div>

It was changed because bit seemed to match the expected type for boolean better than tinyint did. It should have been in the upgrade notes but must have been missed.

Is it causing problems for you?  
  
Nathan

---

<div class="post-metadata">

**Author:** ![markus.zierhut](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@markus.zierhut](https://forum.liquibase.org/u/markus.zierhut)\
**Post date:** [November 6, 2013, 9:43pm UTC](https://forum.liquibase.org/t/mysql-creating-boolean-columns-as-bit-1-instead-of-tinyint-1/2744/3 "2013-11-06T21:43:00Z")

</div>

MySQL itself maps “BOOLEAN” to “TINYINT(1)”.

Thats a much better solution to rely on their mapping than your own.

Can it be changed in a next version?

---

<div class="post-metadata">

**Author:** ![un907739104973893r62](https://avatars.discourse-cdn.com/v4/letter/u/e36b37/32.png) [@un907739104973893r62](https://forum.liquibase.org/u/un907739104973893r62)\
**Post date:** [November 6, 2013, 9:43pm UTC](https://forum.liquibase.org/t/mysql-creating-boolean-columns-as-bit-1-instead-of-tinyint-1/2744/4 "2013-11-06T21:43:00Z")

</div>

I agree with the comment above, BOOLEAN should be a&nbsp;TINYINT(1) in MySQL since that is the default mapping. The current behavior doesn’t work, even the mysql command line is confused and shows random chars
