[LB1.9.3] CSV export leads to difference in changelog.xml and CSV file

Hi,

Just tried the CSV export / import functionality of Liquibase. I exported a MySQL database which I created with Liquibase before. Some of the fields have the Liquibase datatype BOOLEAN, which becomes tinyint(1) in MySQL. The CSV files written contain the values “true” and “false” for these fields, however the changelog.xml column description for the CSV had the type NUMERIC. This causes the import to fail.

I did not find out if this is an problem of the CSVWriter or SqlUtil. Should it be regarded as a bug or is a simple workaround available for this?

Regards,
Chris

Actually, I am surprised that the csv file has true/false as values.  When reading from the database, we look at the database metadata and only see that it is a tinyint(1) and cannot know that it was defined as a boolean virtual type in your original changest.  I would expect them to come through as 1 and 0 in the csv, which would work since your loadData column is NUMERIC. 

You can change the loadData types to BOOLEAN and it will work, but it should generate the correct version right away.

Nathan

I also expected 0 or 1 to be in the CSV. Do you add it to the bug-list so it will be solved?

Regards,
Chris

I created http://liquibase.jira.com/browse/CORE-409 to track it.  It should be fixes as part of 2.0.  Thanks for reporting the problem

Nathan