我有一个带有changelog的数据库。我的application.conf:
slick.dbs.default.profile = "models.database.CustomPostgresProfile$"
slick.dbs.default.db.driver = "org.postgresql.Driver"
slick.dbs.default.db.url = "jdbc:postgresql://127.0.0.1:5432/mydb"
slick.dbs.default.db.user = "postgres"
slick.dbs.default.db.password = "postgres"
liquibase = ${slick.dbs.default.db}
liquibase.changelog = "classpath:liquibase/changelog-master.xml"然后添加具有不同模式的第二个数据库:
slick.dbs.db2.profile = "models.database.CustomPostgresProfile$"
slick.dbs.db2.db.driver = "org.postgresql.Driver"
slick.dbs.db2.db.url = "jdbc:postgresql://127.0.0.1:5432/mydb2"
slick.dbs.db2.db.user = "postgres"
slick.dbs.db2.db.password = "postgres"如何为第二个数据库添加changelog-master-db2.xml?或者在主changelog- changeSet .xml中指定目标数据库。
我使用: scala 2.12.6,play-slick 3.0.1,play-liquibase 1.4
发布于 2021-06-08 22:23:59
建议使用liquibase.properties文件,您可以在一个liquibase.properties文件中提到两个数据库属性和changelog文件。您可以在this page上找到有关liquibase.properties文件的所有详细信息
https://stackoverflow.com/questions/67835784
复制相似问题