私は実際に Windows のコマンド ラインで Liquibase を使用しており、2 つのデータベース間の差分を表す SQL スクリプトを作成しようとしています。残念ながら、代わりにxmlファイルしか取得できません。手伝って頂けますか ?
私のコマンドライン:
liquidbase.bat
--driver=com.mysql.jdbc.Driver
--url=jdbc:mysql://localhost:3306/base1
--username=root
diffChangeLog
--referenceUrl=jdbc:mysql://localhost:3306/base2
--referenceUsername=root
> test.sql
他のフォーラムでこの同様の質問を見たことがありますが、彼は良い答えを得ませんでした ( http://forum.liquibase.org/topic/convert-changelog-xml-file-into-sql-file )。updateSQL cmd から sql ファイルを取得するためのパラメーターもいくつか見ましたが、diffChangeLog のパラメーターは見たことはありません。
XML フィードバックの例:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
<changeSet author="user (generated)" id="1370443156612-1">
<createTable tableName="test">
<column name="a" type="INT"/>
</createTable>
</changeSet>
<changeSet author="user (generated)" id="1370443156612-2">
<addColumn tableName="articles">
<column name="date_debut" type="TEXT">
<constraints nullable="false"/>
</column>
</addColumn>
</changeSet>
事前に感謝します。