The Flyway Migrate Command Explained Simply

The 'Migrate' command automates the process of applying the database schema changes that are defined in migration scripts, while Flyway tracks the version of every copy of the database. This makes it much easier to maintain consistency across different database environments, and so facilitates continuous integration, continuous deployment, and database version control practices. Read more

How to Manage Static Data in Existing Flyway Projects

How do we capture static data in our Flyway projects, and then track and deploy any changes to it, while also ensuring that our automated deployment process doesn't try to deploy static data to databases where it already exists, such as the production database? For new Flyway projects, it's quite straightforward, but for existing projects there may be complications, depending on your database development and deployment strategy. Read more

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

Running DOS Scripts as Callbacks with Flyway

How to perform a range of useful database tasks automatically during Flyway migrations, using a DOS callback script. We provide a demo script that will collect all the necessary information from Flyway, run the task and then save any file with the appropriate name. You can use it to automate tasks such creating backups or DACPACs or generating a build script, each time Flyway creates a new database version. Read more

Automated Provisioning of Multi-Database Environments in a Flyway Development

This article describes how we implemented lightweight database provisioning, using clones, within an automated Flyway release process . It allows users to self-serve personal copies of a complex multi-database system, in a way that is transparent, supports flexible Git branching and merging strategies and agile releases, but does not compromise data security nor add significant admin overhead. Read more