I'm trying to do a Flyway migration on multiple (6 or so) instances of our server. Each one is built and deployed automatically from Git using Bamboo, so I'd really like to be able to use the flyway:migrate
Maven goal so each server migrates itself when it is next deployed.
However I'm just trying out Flyway now, so none of the existing DBs have been init
'd. I'm wondering is it possible for me to somehow specify in Maven that Flyway should init
if it hasn't already, and then migrate
every time?
The migrate docs suggest that "Flyway will create the metadata table automatically if it doesn't exist", but in fact when the flyway:migrate
goal is executed, I get the error:
Failed to execute goal com.googlecode.flyway:flyway-maven-plugin:2.2:migrate (default) on project mutopia-server: Flyway Error: com.googlecode.flyway.core.api.FlywayException: Found non-empty schema "public" without metadata table! Use init() first to initialize the metadata table. -> [Help 1]