Liquibase generateChangeLog 不会使用 postgres 检索所有模式

Liquibase generateChangeLog doesn't retrieve all schemas with postgres

我是 liquibase 的新手,尝试从现有数据库生成更新日志 当我执行以下命令时,我的数据库包含 3 个模式:

    Liquibase --driver=org.postgresql.Driver 
              --classpath=postgresqljdbc4.jar 
              --changeLogFile=db.changelog.xml 
              --url="jdbc:postgresql://localhost:5432/my_bd" 
              --username=username 
              --password=password 
              generateChangeLog

已生成 db.changelog.xml 但它仅检索一个架构信息

How to get all the schemas information

请注意,每个模式都包含表

Liquibase 一次只能处理一个模式,因此您需要告诉它为哪个模式生成变更日志,并执行三次。您可以在 url 中指定 postgres 的架构。有关详细信息,请参阅此问题:

Is it possible to specify the schema when connecting to postgres with JDBC?

如果您需要使用多个模式,您可能需要查看 Datical DB,因为该产品能够在单个变更日志中使用多个模式。

(免责声明:我为 Datical 工作)