The Flyway Engine, OSS (Open-Source Software) and Redgate
Published 03 May 2023
Context
Like a lot of successful Open-Source projects, Flyway is mainly developed by a team of full-time engineers at Redgate, which acquired Flyway a few years ago. As with many of its peers, Flyway's development is funded by having paid tiers and capabilities beyond the open-source version. One of the benefits of being part of Redgate is that Flyway enjoys access to tools and developers from across the breadth of Redgate's DB DevOps suite.
For a long time, Flyway has always come in two versions : Community and Teams, Teams being the paid version and Community being free – both derived from the open-source code base. We have been adding components to Community that we are not able to make OSS and so this article will cover some of the changes that we’re making to the way we distribute Flyway over the next few months.
A brief recap on history
Since before its acquisition, Flyway has been available in paid and unpaid tiers and has been open source since close to its inception. When the paid tier was added, Axel Fontaine, Flyway’s original creator, added a clever piece of technology called "the OSSifier". This allowed Axel to have a single repository containing both the closed and open parts of Flyway. The OSSifier would redact and modify the proprietary code automatically and then upload it to the open-source repository, a very smart optimisation for a single dev working on a large product.
It does come with some downsides however, the primary one being that the open-source repository isn't the source of truth, making community contributions difficult as Pull Requests can't just be accepted, and often leads to the Flyway developers having to rewrite the Pull Request in the closed source repository. This is obviously a much slower approach, robs contributors of the commit history and recognition, and just generally doesn't feel in the spirit of open source.
The problem today
As Flyway matures and the paid tiers gain increased functionality, this process has become more arduous and thus, less frequent.
Alongside this, Flyway has been gaining some fantastic new functionality at the higher tiers by leveraging Redgate proprietary technology. A great example of this is the comparison tech we have added at the Enterprise level, allowing users to version control their database, generate an object level history, auto-generate migration scripts, and generate change and drift reports. However, this limits us to only improving things for paid customers, and not really embracing the full community.
We’ve been getting around this by having the Community version include a few extra proprietary packages to allow free users some of these benefits but as a developer I’ve had concerns because our free tier has drifted further away from the open-source repository.
Modern architecture and a brighter future
The Flyway dev team has been working hard for the last 18 months on two things that will help; moving Flyway to a plug-in architecture, and removing the OSSifier from our process. The former is going very well and is already very apparent in the open-source repository. The latter is a much larger ongoing project, and it will be a while before it’s complete.
What the plug-in architecture will allow us to do is to move proprietary parts of Flyway, such as Undo, into their own proprietary plug-ins. Once this is done, the OSSifier becomes redundant and the core Flyway code will be identical between proprietary and open source. This will allow us to switch to developing core functionality in the open-source repository and, thus, allows the community to contribute directly with Pull Requests. One consequence of this is that the open source package can no longer include the CLI (Command Line Interface) component.
We have also been separating out database support into separate modules as part of the plug-in architecture. Soon, we will move these to their own open-source repository, allowing community members to contribute support for their database of choice. Because this is not reliant on the OSSifier being fully removed, we look forward to being able to quickly add support for the latest and greatest databases thanks to the amazing community we have (I'm looking at you, ClickHouse fans – we see your Pull Requests and you’re first in line once this gets implemented).
Giving everybody what they need, at every level
Being part of the Redgate DB DevOps product suite, Flyway development has a clear focus on DB DevOps. It's the area where Flyway excels and Redgate has expertise that bolsters our work. That isn't all Flyway is used for though. The Flyway API (Application Programming Interface) is immensely popular for a vast number of non-DB DevOps situations which makes bundling proprietary DB DevOps features problematic. As such, we are restructuring our packaging to simplify this.
Price | API | CLI | Desktop | Package | |
---|---|---|---|---|---|
Flyway OSS | Free | Flyway OSS | |||
Redgate Flyway Community | Free | Redgate Flyway | |||
Redgate Flyway Teams | Licensed | Redgate Flyway | |||
Redgate Flyway Enterprise | Licensed | Redgate Flyway |
Flyway OSS
The Flyway OSS package will be generated directly from the OSS source code and contains no proprietary functionality. If you are an API user, this is the package for you and is the same Flyway functionality you have always used.
Redgate Flyway
This takes the OSS codebase and builds on it with proprietary additions that we can’t release to the open-source community.
Redgate Flyway Community
If you need the core Flyway functionality and are looking for a free and convenient route to get it, then this is the version for you.
As a dev team this gives us the flexibility to ship functionality (for free) that we think everyone will find useful, but that we couldn’t make open source. For example, we are building some great technology in-house for DB comparison, script generation and DB cloning and could choose to make parts of that available for free in this edition. We have many teams at Redgate working on some fantastic tech and being able to share that with the Flyway community excites me!
Redgate Flyway Teams & Enterprise
These editions are staying the same as they are currently – we add in proprietary components that larger teams and enterprises find valuable.
These changes will make it easier and faster for the Flyway OSS version to be updated by everyone in the wider community – we know this has been an issue and we’re excited to be making these changes to fully open up Flyway.