Flyway cannot connect to db after Heroku Postgres upgrade
<p>I am upgrading my heroku database from a hobby dev to Standard 0 (using the official instructions <a href="https://devcenter.heroku.com/articles/upgrading-heroku-postgres-databases#upgrade-with-pg-copy-default" rel="nofollow">https://devcenter.heroku.com/articles/upgrading-heroku-postgres-databases#upgrade-with-pg-copy-default</a>).</p>

<p>All went well, until I promoted the new database and restarted the app.  I then get the following error:</p>

<pre><code>o.s.boot.SpringApplication               : Application startup failed
...
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource
...
Caused by: org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource
...
Caused by: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "54.xxx.xx.xxx", user "u94bf9vxxxxxx", database "d2mqk0b6xxxxxx", SSL off
...
</code></pre>

<p>If I swap back to the old database again, everything works again.  The only thing that I am changing is the promoted database.</p>

<p>Is there a difference between connecting to hobby and standard databases that I need to be aware of?</p>

<p>The relevant part of my application.yml looks as follows:</p>

<pre><code>spring:
    datasource:
        driverClassName: org.postgresql.Driver
        url: ${JDBC_DATABASE_URL} 
        username: ${JDBC_DATABASE_USERNAME}
        password: ${JDBC_DATABASE_PASSWORD}
flyway:
    enabled: true
    locations: classpath:db/migrations
</code></pre>

<p>Any suggestions on how I can debug this would be very welcome too.</p>