# When trying to generate changeset from data base get error

**URL:** <https://forum.liquibase.org/t/when-trying-to-generate-changeset-from-data-base-get-error/1753>\
**Category:** General Discussion\
**Created:** [December 5, 2011, 3:47pm UTC](https://forum.liquibase.org/t/when-trying-to-generate-changeset-from-data-base-get-error/1753 "2011-12-05T15:47:00Z")\
**Posts on this page:** 4\
**Page:** 1

<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:** [December 5, 2011, 3:47pm UTC](https://forum.liquibase.org/t/when-trying-to-generate-changeset-from-data-base-get-error/1753/1 "2011-12-05T15:47:00Z")

</div>

It looks like there is a column liquibase thinks is boolean but contains a value of “3”. For boolean values, it just expects 0 or 1.

Nathan

---

<div class="post-metadata">

**Author:** ![alex.fridland](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@alex.fridland](https://forum.liquibase.org/u/alex.fridland)\
**Post date:** [December 5, 2011, 3:47pm UTC](https://forum.liquibase.org/t/when-trying-to-generate-changeset-from-data-base-get-error/1753/2 "2011-12-05T15:47:00Z")

</div>

./liquibase --driver=com.mysql.jdbc.Driver&nbsp;&nbsp; --username=XXXX–password=XXXX–url=“jdbc:mysql://XXXX:3306/ibp-dev”&nbsp; --classpath=./mysql-connector-java-5.1.18-bin.jar&nbsp; --logLevel=debug --changeLogFile=/root/changelog.xml&nbsp; --databaseClass=liquibase.database.core.MySQLDatabase --logFile=log.txt generateChangeLog   
  
Liquibase Update Failed: Unknown bit value: 3  
SEVERE 12/5/11 2:42 AM:liquibase: Unknown bit value: 3  
liquibase.exception.DatabaseException: java.text.ParseException: Unknown bit value: 3  
&nbsp;&nbsp;&nbsp; at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.getColumnTypeAndDefValue(JdbcDatabaseSnapshotGenerator.java:402)  
&nbsp;&nbsp;&nbsp; at liquibase.snapshot.jvm.MySQLDatabaseSnapshotGenerator.getColumnTypeAndDefValue(MySQLDatabaseSnapshotGenerator.java:118)  
&nbsp;&nbsp;&nbsp; at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.readColumn(JdbcDatabaseSnapshotGenerator.java:202)  
&nbsp;&nbsp;&nbsp; at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.readColumns(JdbcDatabaseSnapshotGenerator.java:335)  
&nbsp;&nbsp;&nbsp; at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.createSnapshot(JdbcDatabaseSnapshotGenerator.java:244)  
&nbsp;&nbsp;&nbsp; at liquibase.snapshot.DatabaseSnapshotGeneratorFactory.createSnapshot(DatabaseSnapshotGeneratorFactory.java:69)  
&nbsp;&nbsp;&nbsp; at liquibase.diff.Diff.compare(Diff.java:63)  
&nbsp;&nbsp;&nbsp; at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:145)  
&nbsp;&nbsp;&nbsp; at liquibase.integration.commandline.Main.doMigration(Main.java:719)  
&nbsp;&nbsp;&nbsp; at liquibase.integration.commandline.Main.main(Main.java:133)  
Caused by: java.text.ParseException: Unknown bit value: 3  
&nbsp;&nbsp;&nbsp; at liquibase.database.typeconversion.core.AbstractTypeConverter.convertToCorrectObjectType(AbstractTypeConverter.java:105)  
&nbsp;&nbsp;&nbsp; at liquibase.database.typeconversion.core.AbstractTypeConverter.convertDatabaseValueToObject(AbstractTypeConverter.java:28)  
&nbsp;&nbsp;&nbsp; at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.getColumnTypeAndDefValue(JdbcDatabaseSnapshotGenerator.java:400)  
&nbsp;&nbsp;&nbsp; … 9 more

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [December 5, 2011, 3:47pm UTC](https://forum.liquibase.org/t/when-trying-to-generate-changeset-from-data-base-get-error/1753/3 "2011-12-05T15:47:00Z")

</div>

Problem&nbsp;column is tinyint, which may have values from -127 to 127, but got default 3. Anything we can do short of changing datatype to get it working?

Thanks

---

<div class="post-metadata">

**Author:** ![mikemil2713](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mikemil2713](https://forum.liquibase.org/u/mikemil2713)\
**Post date:** [December 5, 2011, 3:47pm UTC](https://forum.liquibase.org/t/when-trying-to-generate-changeset-from-data-base-get-error/1753/4 "2011-12-05T15:47:00Z")

</div>

I will try to recreate your problem, but I think changing the datatype will probably be the quickest way to get you going.&nbsp;   
  
I see the MySQLTypeConverter returning the TINYINT(1) as the datatype for Boolean type.&nbsp; Not exactly sure why that converter returns the TINYINT instead of the Boolean type, but the getBooleanType() method from the AbstractTypeConverter was overridden to return the TINYINT instead of the Boolean type, which would be returned by the AbstractTypeConverter.
