Flyway

Flyway

Application and Data / Data Stores / Database Tools
Needs advice
on
FlywayFlywayMSSQLMSSQL
and
PostgreSQLPostgreSQL

MSSQL to PostgreSQL database migration can be done through Flyway? Please advise the steps if possible.

READ MORE
4 upvotes·18.5K views
Replies (1)

Flyway is a tool to apply incremental changes to an existing database. These changes can be data changes and/or data model changes. It won't help you with the migration from SQL Server to PostgreSQL or any other combination.

My recommended approach would be:

  1. Migrate the current MS SQL database to PostgreSQL

1.1. dump current DB - best would be as SQL statements - the recommended tools can help you with analyzing the current database schema, use can rewrite it for the new schema, dump data, restore data, test queries, ...

1.2. make changes to the DDL statements (CREATE TABLE, CREATE SEQUENCE,...) if necessary - essentially make a port to PostgreSQL; adapt indexes, stored procedures, views, triggers,...

1.3. create a database instance on PostgreSQL and import adapted structure and data

1.4. automate the dump and restore part as complete as possible to avoid errors on the final migration

  1. Update/adapt and test application with new PostgreSQL database. - essentially fork your application and start a new flyway/application history with the new PostgreSQL schema.

  2. Repeat steps 1 and 2 until everything works as expected

  3. Go Live: deploy everything in production (take application down, migrate database, change db connection info, apply new application with PostgreSQL)

  4. from there on use flyway to do incremental updates in your database matching the changes in your entity/repository classes. initial Flyway migration (for example V10basescheme.sql) should be the schema made in step 1.2.

READ MORE
6 upvotes·235 views
Needs advice
on
FlywayFlyway
and
LiquibaseLiquibase

All the DB deployments in our current organization are manual. We want to automate them. We are leaning toward Liquibase since it has versioning and rollbacks. Is Flyway better or Liquibase?

READ MORE
3 upvotes·578.8K views
Replies (3)
Recommends
on
Flyway

I have worked with both products and Flyway is more lightweight and flexible from my point of view. Rollback is a good point for Liquibase, but it slightly dangerous to rely on this feature. How do you imagine the rollback in case of column delete? Much better to include a database backup as a standard step of an application update. Versioning is not an issue in both products.

READ MORE
5 upvotes·235 views
Java Developer ·
Recommends
on
Flyway

Do you have one single database system, or do you need to support several, like e.g. Postgres and MariaDB? Because to me, that’s the major difference: while in Flyway, you write the migrations in plain SQL (in your databases dialect), Liquibase abstracts from that using a XML/YAML language, which it can translate to a dozen different SQL dialects at runtime. However, if you know that you’ll always have that one single database, learning that abstraction is pretty pointless.

READ MORE
5 upvotes·272 views
View all (3)
Needs advice
on
FlywayFlywayLiquibaseLiquibase
and
MycliMycli

Currently I am using Flyway as version based database migration tool, however I am thinking for an alternative tool which can produce better reporting and whose performance is better. Currently flyway migration is taking too much time, how I can improve the performance..

READ MORE
1 upvote·22.1K views