liquibase diff不显示两个数据库之间的完整差异集

时间:2018-12-06 00:16:26

标签: maven oracle12c liquibase

我是liquibase的新手,并尝试获取两个数据库之间的差异。如果我在两个数据库上都运行了带有diffTypes = data的generatechangeLog,则能够正确生成所有数据,并且可以看到一个数据库具有其他表和数据。

-rw-r--r-- 1 ygupta 1049089 136M Dec  6 10:08 changelog.xml
-rw-r--r-- 1 ygupta 1049089 194M Dec  6 10:10 kris.changelog.xml

当我尝试进行比较时,得到的输出如下:

[INFO] Executing on Database: jdbc:oracle:thin:XXS/paXXXX@docker-ygupta.dXXXXXXXXXXXXXXXXXXXX:1522/ORCL
[INFO] Performing Diff on database CXX @ jdbc:oracle:thin:CMS/password@docker-ygupta.domXXXXXXXX:1522/ORCL (Default Schema: CMS)

Diff Results:
Reference Database: CMS @ jdbc:oracle:thin:CMS/password@172.18.41.77:1522/ORCL (Default Schema: CMS)
Comparison Database: CMS @ jdbc:oracle:thin:CMS/password@docker-ygupta.doXXXXXXXXXXXXXXXXXXXXX:1522/ORCL (Default Schema: CMS)
Product Name: EQUAL
Product Version: EQUAL
Missing Data(s): NONE
Unexpected Data(s): NONE
Changed Data(s): NONE

这种行为让我感到困惑,非常感谢您有什么要寻找的指针?

我的pom.xml:

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mytests.liquibase</groupId>
  <artifactId>my-liquibase</artifactId>
  <version>1</version>
  <dependencies>
          <dependency>
                  <groupId>com.oracle</groupId>
                  <artifactId>ojdbc7</artifactId>
                  <version>12.1.0.2.0</version>
          </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.liquibase</groupId>
        <artifactId>liquibase-maven-plugin</artifactId>
        <version>3.4.0</version>
        <configuration>
                <propertyFile>
                        C:/Users/ygupta/Tools/db/liquibase.diff.properties
                </propertyFile>
                <promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

我的属性文件:

driver=oracle.jdbc.OracleDriver
#url=jdbc:oracle:thin:XXX/paXXXX@172.18.41.77:1522/ORCL
url=jdbc:oracle:thin:XXX/paXXXX@docker-XXXXXXXXXXX:1522/ORCL
#defaultSchemaName=cms
#changelogSchemaName=cms
#diffIncludeSchema=true
username=cms
password=password
changeLogFile=C:/Users/ypta/Tools/db/dxiff.changelog.xml

#diffChangeLogFile=C:/Users/ypta/Tools/db/diff.changelog.xml
#referenceDefaultSchemaName=cms
referenceUsername=cms
referencePassword=paXXXXX

#referenceUrl=jdbc:oracle:thin:XX/XXXXX@docker-XXXXXX:1522/ORCL
referenceUrl=jdbc:oracle:thin:XX/XXXXXd@172.18.41.77:1522/ORCL
propertyFileWillOverride=true
referenceDriver=oracle.jdbc.OracleDriver

这是我的maven命令:mvn -X liquibase:diff -Dliquibase.diffTypes = data -f backup_pom.xml

Liquibase版本是3.4.0 Java 8 Maven 3.6

0 个答案:

没有答案