Hi there,
I'm new with Liquibase. I have researched on that case but still stuck.
Environment
+ Database: PostgreSQL 9.6 on Ubuntu
+ SOURCE
- table t1 ( ab int, b int) -- 0 row
- table t2 ( a int , b int) -- 0 row
+ TARGET
- table t1 (a int, b int) -- 2 row
- table t2 (a int, b int) -- 0 row
Then I use command below to compare source verse target
- ./run-liqb --driver=org.postgresql.Driver \
- --classpath=./lib/postgresql-42.0.0.jar \
- --url=jdbc:postgresql://localhost:5432/target \
- --username=postgres \
- --password=123456 \
- diffChangeLog \
- --referenceUrl=jdbc:postgresql://localhost:5432/source \
- --referenceUsername=postgres \
- --referencePassword=123456 >> dif.changelog.xml
The content of dif.changelog.xml is:
- <?xml version="1.1" encoding="UTF-8" standalone="no"?>
- <databaseChangeLog...............>
- <changeSet author="sentifi (generated)" id="1490856133794-1">
- <createTable tableName="t3">
- <column name="a" type="INT"/>
- <column name="b" type="INT"/>
- </createTable>
- </changeSet>
- <changeSet author="sentifi (generated)" id="1490856133794-2">
- <addColumn tableName="t1">
- <column name="ab" type="int4"/>
- </addColumn>
- </changeSet>
- <changeSet author="sentifi (generated)" id="1490856133794-3">
- <dropColumn columnName="a" tableName="t1"/>
- </changeSet>
- </databaseChangeLog>
Actually, I don't want to drop column t1.a on target.
Of course, I can it manually but I hope other ways. Are there other way to work around ?
Please ask me if you need more detailed info.
Thank you.