# how to get "generateChangelog" express db columns in JDBC generic data types?

**URL:** <https://forum.liquibase.org/t/how-to-get-generatechangelog-express-db-columns-in-jdbc-generic-data-types/37>\
**Category:** General Discussion\
**Created:** [May 5, 2009, 3:17pm UTC](https://forum.liquibase.org/t/how-to-get-generatechangelog-express-db-columns-in-jdbc-generic-data-types/37 "2009-05-05T15:17:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![riceball\_lb](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@riceball\_lb](https://forum.liquibase.org/u/riceball_lb)\
**Post date:** [May 5, 2009, 3:17pm UTC](https://forum.liquibase.org/t/how-to-get-generatechangelog-express-db-columns-in-jdbc-generic-data-types/37/1 "2009-05-05T15:17:00Z")

</div>

Below link has the data types that is “generic” defined in Liquibase, or we can use “java.sql.Types.\*” . “updateDatabase” can take it very well.  
[http://www.liquibase.org/manual/column](http://www.liquibase.org/manual/column)  
But is there a way to have “generateChangelog”&nbsp; generate xml in this fashion? A concrete example is:  
“generateChangelog”&nbsp; currently generates this:  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;   
How can we get it to generate below:  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

The advantage is that one xml can support multiple DBs.  
Thanks,  
riceball

---

<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:** [May 5, 2009, 3:17pm UTC](https://forum.liquibase.org/t/how-to-get-generatechangelog-express-db-columns-in-jdbc-generic-data-types/37/2 "2009-05-05T15:17:00Z")

</div>

Currently we do not have logic in liquibase to convert from database specific types to generic types.&nbsp; When we get the column metadata from the database it is a database-specific type, and my concern has generally been that we may loose expected datatype characteristics&nbsp; (special features of varchar2 vs varchar, precision may be off slightly) when converting to generic types.&nbsp;

What I would recommend is using the generateChangeLog to create your starting changelog xml file, then creating an XML parser to modify the particular datatypes you need changed to the generic type you expect them to be.

I’ve done this with mysql-\>mssql, and using dom and xpath it is not a difficult thing to do.

---

<div class="post-metadata">

**Author:** ![riceball\_lb](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@riceball\_lb](https://forum.liquibase.org/u/riceball_lb)\
**Post date:** [May 5, 2009, 3:17pm UTC](https://forum.liquibase.org/t/how-to-get-generatechangelog-express-db-columns-in-jdbc-generic-data-types/37/3 "2009-05-05T15:17:00Z")

</div>

Thanks for the suggestion! It makes sense!
