Good Morning everyone, I am creating a backend for my application and I want to migrate my database using Flayway.
I added the required dependancies to my pom.xml
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-postgresql</artifactId>
<version>10.15.0</version>
</dependency>
I also configured my application.yml:
spring:
datasource:
username: speed
url: jdbc:postgresql://localhost:5432/DBManage
password: userpass66!
jpa:
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect
format_sql: 'true'
hibernate:
ddl-auto: update
show-sql: 'true'
flyway:
driverClassName: org.postgresql.Driver
enabled: true
baseline-on-migrate: true
user: speed
password: userpass66!
But after using the flyWay pulgin (I am using vscode by the way) I got this error:
[ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:10.20.1:migrate (default-cli) on project backend: org.flywaydb.core.api.FlywayException: Unable to connect to the database. Configure the url, user and password! -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Can anyone advice me or tell me why I got this error since I created all the necessary migration files on the db\migration.
Thank you.