Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is flyway database agnostic in its support for multiple databases?

Tags:

flyway

Is Flyway suitable for implementation in an application that will support multiple databases?

We don't know what our customers are using - could be either MySQL, Postgres or Oracle. Can we still use Flyway to migrate the database for new versions of the application?

like image 456
Gert-Jan van de Streek Avatar asked Sep 05 '11 15:09

Gert-Jan van de Streek


1 Answers

if your question is: does Flyway provide a DDL abstraction layer across the databases it supports, the answer is no.

This was a conscious design decision, to make sure the full power of the underlying database is available and not just the smallest common denominator supported by the migration tool.

For your use case, you could either provide different migration scripts for the different databases. They should be very similar though.

If you do not wish to potentially duplicate the migration scripts and can live with the smallest common denominator approach, have a look at LiquiBase which might be a better fit for your usecase (if you can live with the XML)

like image 51
Axel Fontaine Avatar answered Oct 31 '22 09:10

Axel Fontaine