I’m following this tutorial: https://www.youtube.com/watch?v=vtPkZShrvXQ
… and I am having trouble with database migrations. I am using Spring Boot 2.2.7, and I have created a PostgreSQL database called “demodb”
When I run the program, the console gives the error:
org.postgresql.util.PSQLException: FATAL: database "demodb" does not exist
Here is my application.yml file, which contains the database info:
app:
datasource:
plaltform: postgres
jdbc-url: jdbc:postgresql://localhost:5432/demodb
username: postgres
password: password
pool-size: 30
Here are my dependencies in the pom.xml file:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>2.2.7.RELEASE</version>
</dependency>
</dependencies>
I'm running my migrations in a separate fold, and like I said, the database "demodb" DOES exist (I created it from the terminal), so I’m not sure why I’m getting this error. Any ideas?