【问题标题】:Liquibase is not creating database after setting createDatabaseIfNotExist=true设置 createDatabaseIfNotExist=true 后 Liquibase 未创建数据库
【发布时间】:2015-07-13 17:09:37
【问题描述】:

我在build.gradle添加了数据库配置

liquibase {
   activities {
   main {      
      changeLogFile "${this.rootDir}/src/main/resources/changelog-master.xml"
      url "jdbc:postgresql://localhost:5432/test?createDatabaseIfNotExist=true"
      username "xxxx"
      password "xxxx"

     } 
  }
 runList = 'main'
} 

createDatabaseIfNotExist 在 URL 中设置为 true。

当我启动服务器时,它给出的数据库不存在。

如果数据库不存在,我希望 liquibase 创建数据库。

有什么建议

【问题讨论】:

    标签: java database gradle build.gradle liquibase


    【解决方案1】:

    这是一个 postgres jdbc 问题,而不是 liquibase。

    我搜索了 postgres documentation 并找不到“createDatabaseIfNotExist”。那是mysql的连接参数吗?

    【讨论】:

    猜你喜欢
    • 2020-03-22
    • 1970-01-01
    • 2011-02-16
    • 1970-01-01
    • 1970-01-01
    • 2020-12-14
    • 1970-01-01
    • 2020-09-14
    • 1970-01-01
    相关资源
    最近更新 更多