title: PostgreSQL ‘database does not exist’ - Java Spring Boot, Flyway, Docker/PostgreSQL
body: <p>I’m following this tutorial: <a href="https://www.youtube.com/watch?v=vtPkZShrvXQ" rel="nofollow noreferrer">https://www.youtube.com/watch?v=vtPkZShrvXQ</a></p>
  
  <p>… 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”</p>
  
  <p>When I run the program, the console gives the error:</p>
  
  <p>org.postgresql.util.PSQLException: FATAL: database "demodb" does not exist</p>
  
  <p>Here is my application.yml file, which contains the database info:</p>
  
  <pre><code>
  
  app:
    datasource:
      plaltform: postgres
      jdbc-url: jdbc:postgresql://localhost:5432/demodb
      username: postgres
      password: password
      pool-size: 30
  </code></pre>
  
  <p>Here are my dependencies in the pom.xml file:</p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.junit.vintage&lt;/groupId&gt;
                  &lt;artifactId&gt;junit-vintage-engine&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
          &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.flywaydb&lt;/groupId&gt;
          &lt;artifactId&gt;flyway-core&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.zaxxer&lt;/groupId&gt;
          &lt;artifactId&gt;HikariCP&lt;/artifactId&gt;
          &lt;version&gt;3.2.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot&lt;/artifactId&gt;
          &lt;version&gt;2.2.7.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>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?</p>