Product articles Cross-RDBMS

Using Flyway as a Multi-Database Migration System

Flyway can scale easily to enterprise-scale database systems, even if they involve a mix of relational database systems, are cloud-based, containerized or involve complex authentication. This article demonstrates how we can use Flyway Teams to do a single-batch, multi-database migration, comprising SQL Server, Oracle Cloud, PostgreSQL, MySQL and SQLite databases. Read more

How to Write and Debug a PowerShell Callback for Flyway Migrations

We can use callbacks in Flyway to plug into any part of the Flyway lifecycle and run various database tasks before or after a particular event takes place. In this article I've tried to assemble a 'best practice' guide for writing callbacks to ensure that the scripts always behave predictably, and so that when things go awry the cause is easy to spot, without hours of painful scrolling through Flyway output. Read more

Planning a Database Testing Strategy for Flyway

With Flyway, you can adopt a test-driven development strategy that will allow you to test and evaluate databases, and database objects, at every phase of the database development lifecycle. The further down the delivery pipeline that bugs appear, the more costly in time and resources they are to fix. This approach will allow you to catch many of them before the database change even gets committed to version control, making a continuous delivery process much easier to adopt and sustain. Read more

Passing Parameters and Settings to Flyway Scripts

This article explains the various ways of using placeholders to pass information and settings to any Flyway script, to gain bit of extra flexibility in a migration run., providing examples of conditional execution, running SQL expressions using environment variables and even one of using placeholders in a callback to send a warning notification to your phone, after a migration completes. Read more

Code Visibility: Browsing through Flyway Migration Files

If you can convert a SQL file to HTML, then you can inspect your Flyway migration files in a browser. This is especially useful if your SQL is color-coded with the same conventions as it was in your IDE. It is even better still if your browser can allow you to scan through many files, moving from file to file with a single click. This article demonstrates how to do this with a few PowerShell scripts. Read more

Doing Flyway Migrations for Many Different Databases and Projects

This article demonstrates a PowerShell automation technique that will allow you to run any Flyway build or migration task on any number of projects and databases, hosted on a range of RDBMSs. It handles all connection and authentication details securely, makes it easier to automate database testing and can send detailed alerts when Flyway encounters an error. Read more