Liquibase generateChangeLog - 如何排除某些数据并将所有ddl更改日志保留为单次执行?

时间:2018-03-26 13:27:31

标签: liquibase

我正在使用Liquibase maven插件的generateChangeLog目标来生成目标数据库的完整更改日志。但是,目前我需要为导出的数据部分排除一些表,因为它们包含太多数据而且我得到OutOfMemory例外。

是否可以使用diffExcludeObjectsdiffIncludeObjects仅排除/包含更改日志数据部分的表,同时使用ddl部分的所有表?

我尝试将run分成三个单独的执行,它们使用以下diffTypes

  • 表,视图,列,primarykeys
  • 数据
  • foreignkeys,uniqueconstraints,索引

然而,当我这样做时,我面临以下错误。

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.251 s
[INFO] Finished at: 2018-03-26T13:49:08+01:00
[INFO] Final Memory: 15M/981M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.4.0:generateChangeLog (workflow-ddl-generate) on project CalmsLiquibaseBaselineGeneration: Error setting up or running Liquibase: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: Could not resolve UnexpectedObjectChangeGenerator dependencies due to dependency cycle. Dependencies:
[ERROR] [] -> Table -> []
[ERROR] [] -> View -> []
[ERROR] [] -> PrimaryKey -> []
[ERROR] [] -> Schema -> []
[ERROR] [ForeignKey] -> Column -> []
[ERROR] [] -> Catalog -> []
[ERROR] -> [Help 1]

1 个答案:

答案 0 :(得分:0)

您可能只是尝试增加提供给Liquibase JVM的内存并将其保留在一次运行中。