Hi,
I am trying yo use the diff tool in order to compare my current DB state to a snapshot I created.
I am using liquibase version 4.3.0 #16 built on windows.
My database is on a remote (linux) server.
I do not have a database named “postgres”, instead I have a database with a different name, and multiple schemas.
The databasechangelog and databasechangeloglock tables are under a schema called “common”.
I used this sequnce of actions:
- create the snapshot using this command:
#liquibase “–url=jdbc:postgresql://10.7.7.15:2020/octdb” --defaultSchemaName=common snapshot > snapshots\snapshot1502145.json
– I can see the snapshot is created, with all the DB objects.
- Prepare a new table script using the file dbchangelog.xml.
Generate it using the command:
#liquibase --defaultSchemaName=common update
–Checked both DB and table databasechangelog to make sure the table was indeed created.
- Test the diff using the command:
#liquibase “–url=jdbc:postgresql://10.7.7.15:2020/octopusdb” --username=octopusrepmgr --password=mypassword --defaultSchemaName=common diff “–referenceUrl=offline:postgresql=snapshots\snapshot1502145.json” --diffTypes=tables
However, instead of just getting a report on the one table I created, I get a list of all the tables under this schema as “unexpected”:
Liquibase Community 4.3.0 by Datical
####################################################
_ _ _ _
| | () () |
| | _ __ _ _ _ | |_ __ _ ___ ___
| | | |/ _ | | | | | '_ \ / _
/ __|/ _ \
| || | (| | || | | |) | (| _ \ __/
_/|_, |_,||./ _,|/__|
| |
|_|
Get documentation at docs.liquibase.com
Get certified courses at learn.liquibase.com
Free schema change activity reports at
https://hub.liquibase.com
####################################################
Starting Liquibase at 12:20:15 (version 4.3.0 #16 built at 2021-02-09 15:47+0000)
Diff Results:
Reference Database: null @ offline:postgresql=snapshots\snapshot1502145.json (Default Schema: common)
Comparison Database: srepmgr @ jdbc:postgresql://10.97.7.150:2020/octdb (Default Schema: common)
Compared Schemas: common
Product Name:
Reference: ‘Offline postgresql’
Target: ‘PostgreSQL’
Product Version:
Reference: NULL
Target: ‘11.10’
Missing Table(s): NONE
Unexpected Table(s):
address
address_streets_ref
base_profile
cars
cars1
contact
contact_list
etc…
Why is that happening?
Is there a parameter I am missing?
Thanks,
Tamar