I'm exporting a Oracle schema, and I want to have a script that I can use for in-memory tests with H2.
I export the schema with maven, mvn liquibase:generateChangeLog
.
I have noticed that when I specify an outputChangeLogFile
of type sql
, the Oracle and H2 formats produce different output (e.g. generatedChangelog.h2.sql
vs generatedChangelog.oracle.sql
).
With type xml
they produce the same ( generatedChangelog.h2.xml
vs generatedChangelog.oracle.xml
).
In particular, with the sql
type I get
NAME VARCHAR(255) NOT NULL
for H2NAME VARCHAR2(255 BYTE) NOT NULL
for Oracle
with the xml
format I get
<column name="NAME" type="VARCHAR2(255 BYTE)">
for both H2 and Oracle
this particular syntax is not valid with H2, so this seems a bug to me. Liquibase can clearly understands this as you can see from the sql
example, but it doesn't produce a valid changeSet
for the xml
format.
Is there anything I can do to produce the correct output in xml
format?
Thanks