5

I added database configuration in 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 is set to true in the URL.

When I start the server, it gives database does not exists.

I want liquibase to create database if it doesn't exists.

Any suggestions please

1 Answers1

1

This is a postgres jdbc issue, not liquibase.

I searched the postgres documentation and could not find "createDatabaseIfNotExist". Is that a mysql connection parameter?

Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185