1

Flyway is really nice for migrating database, but it needs something to migrate.

An system might have addition and removal of applications each having their own database and credentials in a shared Postgres in Kubernetes for instance.

Manual setup by a sysadmin or developer is not an option.

What is the best practices for this, if any?

Erik Martino
  • 4,023
  • 1
  • 19
  • 12

1 Answers1

0

You should be able to achieve what you want with Flyway out of the box. You could create a new database using Flyway's initSql setting.

Flyway will then automatically use the publicschema within that database, or if you specified a specific schema in the schemas setting it will create that for you as well.

Axel Fontaine
  • 34,542
  • 16
  • 106
  • 137