I
get the changelog from PostgreSQL database with the command:
- liquibase \
- --driver=org.postgresql.Driver \
- --classpath="C:\db_drivers\postgresql-9.3-1102.jdbc3.jar" \
- --changeLogFile="./postgresql_changelog.xml" \
- --url="jdbc:postgresql://localhost:5432/postgres" \
- --username=schema_name_here \
- --password=************** \
- --logLevel=debug \
- --defaultSchemaName=sep \
- generateChangeLog
Here is a fragment of postgresql_changelog.xml:
-
...
<createTable tableName="table1">
<column name="total_pk" type="INT8">
<constraints nullable="false"/>
</column>
<column name="form_fk" type="INT8">
<constraints nullable="false"/>
</column>
<column name="territory_fk" type="INT8">
<constraints nullable="false"/>
</column>
<column name="parameter_fk" type="INT8">
<constraints nullable="false"/>
</column>
<column name="enterprise_fk" type="INT8">
<constraints nullable="false"/>
</column>
<column name="total_g" type="INT8">
<constraints nullable="false"/>
</column>
<column name="total_data" type="date">
<constraints nullable="false"/>
</column>
<column name="total_value" type="numeric(*, 2)">
<constraints nullable="false"/>
</column>
<column name="variant_fk" type="INT8">
<constraints nullable="false"/>
</column>
<column name="period_id" type="INT8">
<constraints nullable="false"/>
</column>
<column name="total_q" type="INT8"/>
<column name="total_m" type="INT8"/>
<column name="increase" type="INT8"/>
<column name="period_index" type="INT8"/>
<column name="data_input" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="document_unid" type="VARCHAR(64)"/>
<column name="value_comment" type="VARCHAR(512)"/>
<column name="olap_year" type="SMALLINT"/>
<column name="olap_month" type="SMALLINT"/>
<column name="olap_week" type="SMALLINT"/>
<column name="olap_day_of_month" type="SMALLINT"/>
<column name="olap_quarter" type="VARCHAR(4)"/>
<column name="olap_quarter_desc" type="VARCHAR(17)"/>
<column name="olap_month_name" type="VARCHAR(8)"/>
<column name="ediz_id" type="INT8">
<constraints nullable="false"/>
</column>
<column name="olap_month_code" type="VARCHAR(10)"/>
<column name="olap_month_caption" type="VARCHAR(64)"/>
</createTable>
...
Now I want to create the same objects and the same relationships in another database (Oracle):
- liquibase
--driver=oracle.jdbc.OracleDriver
--classpath="C:\db_drivers\ojdbc14.jar"
--changeLogFile="./postgresql_changelog.xml"
--url="jdbc:oracle:thin:@ip_here:orabeta"
--username=***
--password=***
update
But it does not work: ORA-00902
It is possible to get changelog from one database and update
another database in different RDBMS server from this changelog? I need
to get automatic data type conversion.