Liquibase 3.0.6: change to the handling of Boolean?

Hi


I’ve a few change sets that are simple sql inserts/updates to handle my reference data, for example:

INSERT INTO Variable (id, version, core, created_on, description, name)

  VALUES

  (‘ce02bb08-ae7d-4f9c-a94b-bc2a7fcd982c’, 0, 1, ‘2013-08-29 14:55:09’, ‘desc 1’, ‘name 1’),

  (‘53c50b45-8b3b-4061-9594-b1fe3826080f’, 0, 1, ‘2013-08-29 14:55:09’, ‘desc 2’, ‘name 2’);


where the column 'core has been defined as:

           

               

           



Eg, my sample data set use 0 and 1 for boolean values.


This works w/out problem with liquibase 3.0.5 against Derby 10.10 and mySql 5.5.

This fails with liquibase 3.0.6 against Derby:


Error executing SQL INSERT INTO Variable …: Columns of type ‘BOOLEAN’ cannot hold values of type ‘INTEGER’. 

at liquibase.Liquibase.update(Liquibase.java:137)


There was a change to better support the actual BOOLEAN type in derby. It should be able to convert 1 to “true” in that case still, though. I created https://liquibase.jira.com/browse/CORE-1561 to track the issue.


Nathan

Since you are using liquibase cannot parse or know that 1 and 0 are going into a boolean column to do any sort of conversion. 


You could use changelog parameters like:


Nathan

That’s an interesting technique, I’ll try that.


We use liquibase to manage some reference and test data and we found it easier, so far, to dump and massage sql…


How effective is the use of the liquibase diff tool for data dumps?