db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Kellerer <spam_ea...@gmx.net>
Subject Re: Derby SQL diff tool suggestions
Date Fri, 09 Jan 2009 11:45:24 GMT
Damian Carey wrote on 09.01.2009 11:56:
> I can then apply this diff to an existing Version 7 schema, and I will
> have a Version 8 database.
> 
> From what I understand SqlWorkbench can do this for Postgres and
> Oracle, but not for Derby(?).
> 
> I would be delighted to find out that SqlWorkbench can create diffs
> for Derby :-())   !

Damian,

the output of the diff command is xml, so it's DBMS independent.

I have pre-built XSLTs to transform that XML output to SQL specific for Oracle 
and Postgres. It shouldn't be too difficult to create a Derby XSLT.
Most probably the Postgres XSLT already covers 80% anyway because Postgres is 
pretty close to ANSI SQL anyway.

So something like:

WbSchemaDiff -referenceProfile='Version7' -targetProfile='Version8'
      -file=diff_7_to_8.xml
      -stylesheet=wbdiff2pg.xslt
      -xsltOutput=diff_7_to_8.sql

will probably already give you a pretty usable SQL script.

You can contact me offline (using the support email on my homepage) if you need 
adjustments to the XSLT. I don't mind adding a Derby specific XSLT.

Regards
Thomas


Mime
View raw message