Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Re : Liquibase 3.0.6: change to the handling of Boolean?

$
0
0
Since you are using <sql> 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:

NSERT INTO Variable (id, version, core, created_on, description, name)
  VALUES
  ('ce02bb08-ae7d-4f9c-a94b-bc2a7fcd982c', ${false}, ${true}, '2013-08-29 14:55:09', 'desc 1', 'name 1'),
  ('53c50b45-8b3b-4061-9594-b1fe3826080f', ${false}, ${true}, '2013-08-29 14:55:09', 'desc 2', 'name 2');

and set them based on the db in the header:

<parameter name="false" value="1" dbms="mysql"/>
<parameter name="false" value="false" dbms="derby"/>

Or you can switch to using the <insert> tag where you can specify the "type" in the column tags as boolean and then liquibase can do the conversion.

Nathan

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>