Liquibase is putting quotes around int values when generating sql for DB2

I created the following ANT task which generates output to a sql file

        <updateDatabase
             outputfile="${db.output.file}"
             changeLogFile="${db.master.file}"
             driver="${db.driverName}"
             url="${db.url}"
             username="${db.username}"
             password="${db.password}"
             promptOnNonLocalDatabase=“false”
             dropFirst=“false”
             contexts="${db.type}"
             classpathref=“liquibase-classpath”
             defaultSchemaName="${db.schema}"/>
   

This is my properties configuration

db.driverName=com.ibm.db2.jcc.DB2Driver
db.url=jdbc:db2://192.168.56.10:50000/TEST
db.username=db2inst1
db.password=db2inst1
db.schema=db2inst1
db.type=db2
db.output.file=c:\output.sql
db.master.file = c:\master.sql

I run the ANT task and it produces the correct sql output. However, The integer values are being generated with single quotes around it.The insert statement below is what was generated. The ID field has quotes around the value.I ran the sql against my local db2 on linux and it worked fine. However, it does not work on db2 mainframe.

INSERT INTO table(id, lst_chg_ts, lst_lgn_id, msg_cod, msg_txt) VALUES (‘37’, ‘2011-09-08 15:00:00’, ‘ADMIN’, ‘1037’, Test’)/

Is there a way to get liquibase to strip out the quotes on int fields or could someone give me some direction on where to change the code to prevent this? Thanks

In your tag, are you using value=“1037” or valueNumeric=“1037”. ValueNumeric should let tell liquibase that it should not quote it on the insert.


The code that create the sql is liquibase.sqlgenerator.core.InsertGenerator in 2.0. You can subclass it with the extension system (liquibase.org/extensions) if there is a problem with it.


Nathan

I should have clarified more. We’re not using the insert tags. We’re using CSV files w/ headers and using the loadData tag.I resolved the issue by putting the type in the column tags. Before we were using


          


This was causing all of our columns to contain quotes . I changed our loaddata to be


           
           
 

After there, it removed the quotes around the ID and put quotes on the msg_code. Thanks