我是 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 工作)
关于postgresql - Liquibase generateChangeLog 不会使用 postgres 检索所有模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50099596/