Bytebase vs. Flyway: a side-by-side comparison for database schema migration
If Flyway is Git, then Bytebase is GitHub/GitLab.
When looking for a database CI/CD and schema migration change tool, Bytebase and flyway are two common options. Understanding the differences between these two tools can help potential users choose the one that best meets their needs.
What Bytebase and Flyway have in common
- Native SQL supported.
- Database DevOps with version control system #GitOps (see Database GitOps configuration).
- Schema Synchronization (see Sync schema).
- Tiered pricing, offering both free and paid plan.
- Open source, Flyway has a long history, while Bytebase is growing faster.
What are the differences between Bytebase and Flyway?
While both Bytebase and Flyway are tools for database DevOps, there are some key differences between the two. Flyway main product is its CLI and the java library. Bytebase also provides a CLI, while its main product is the GUI-based workspace for developers and DBAs to collaborate.
|Product position||Schema change||Schema Change, Data Query and Secure|
|Supported databases||22 Only SQL DB||13 SQL & NoSQL DB|
|Programming language and installation||Java + JVM||Golang and no other dependency|
|Change execution||SQL script + CLI||Issue + GUI|
|Batch Change||-||✅ Multi-environment / Multi-tenant|
|SQL auto check||✅ Paid version||✅ Available in Free version|
|Rollback||✅ Manual||✅ Auto generated rollback statement|
|Schema drift detection||✅ Manual||✅ Auto|
|Slow query detection and advisor||-||✅|
|Data access control, security and compliance||-||✅|
Flyway: A database schema change and version control tool.
Bytebase: In addition to database schema change and version control, Bytebase also provides data query, security, and governance features. It provides a GUI based collaboration workspace that helps DBAs and Developers manage the database development lifecycle.
- Flyway: A command-line tool. With JVM, it also provides Java API, Maven plugin and Gradle plugin. A simple graphical user interface (GUI) called Flyway Desktop is available for SQL Server, PostgreSQL and MySQL.
- Bytebase: A web-based GUI tool. It also provides a command-line interface (CLI), application programming interface (API), Terraform Provider, and GitHub App.
- Flyway: 22 SQL databases - MySQL, PostgreSQL, IBM DB2, MS SQL Server, Oracle, PostgreSQL, MySQL, Snowflake ...
- Bytebase: 13 SQL and NoSQL databases - MySQL, PostgreSQL, ClickHouse, Snowflake, MongoDB, Redis, Redshift, Oracle, MS SQL Server ...
- Flyway: Java-based tool, so you need to install a Java Virtual Machine (JVM) before users can install Flyway.
- Bytebase: Go-based tool, a self-contained bianry with no external dependency. Also provides Docker and Kubernetes deployment.
- Flyway: CLI or GitOps. Users write SQL files and then run command
Bytebase: Web-based GUI or GitOps. Users create issues with SQL which could be approved. An issue may include SQL running against one database, or batch change against multiple databases span across different development environments and different tenants.
Users can create tenant project to facilitate batch change. In tenant mode, users can do advanced canary release.
Users can also do online schema change for large tables to reduce downtime from hours to seconds.
Database GitOps configuration
Flyway: Configure with VCS CI/CD workflow manually.
Bytebase: Point-and-Click GitOps workflow setup.
You may even enable SQL Review in GitLab automatically by clicking a checkbox while configuring GitOps workflow. (which is not in the video)
Check the video: Setting up GitLab VCS integration for Bytebase (GitOps)
Because Bytebase has the similar project concept as seen in GitLab/GitHub, the GitOps integration is nature to the developers.
SQL auto check
SQL auto check helps developers write less buggy SQL and save DBAs manual review efforts.
- Flyway: Code Analysis
- Bytebase: SQL Review
- Flyway: Only in Team Plan or above
- Bytebase: Available in Free Plan
Number of rules
- Flyway: 10+ general rules or integrate a python app called SQLFluff to get more rules.
- Bytebase: 49 rules for MySQL, 38 rules for PostgreSQL, 18 rules for Oracle ...
How to configure
- Flyway: Predefined, users may set them active or not.
- Bytebase: Rules are predefined, users can activate and choose error level for specific rules. The picked rule set will make a reusable policy which can be applied to environment, e.g.
How to trigger
flyway check -code ....command to produce a report.
Bytebase: Three places to trigger SQL review by default, users may manually integrate it to other scenarios by API as well:
When a database change is created as an issue.
When users query data from SQL Editor.
When users enable GitOps workflow, before a new SQL is merged into the main branch.
- Flyway: Not supported.
- Bytebase: Basic rollout and risk-based custom approval flow.
flyway infoto show a simple history table.
Bytebase: Change History tracking diffs and the originated issue.
Flyway: Via the flyway desktop, there is a way to generate a migration script to bring the target database schema in sync with the one you already created (usually dev).
Bytebase: Choose a specific schema version, auto calculate the diff with selected databases.
Schema drift detection
- Flyway: Run
flyway check -drift ...to produce a report indicating difference between target database and the one created by the migrations applied by Flyway.
- Bytebase: Will auto detect schema diff if someone manipulates the schemas out of Bytebase.
- Flyway: Write rollback scripts manually. Supported in Team version or above.
- Bytebase: By using sync schema, users may revert to a specific version. Also support auto rollback. For Free version, users can revert to the latest version, while for Pro version or above, users can choose any version.
Slow query detection and advisor
- Flyway: Not supported.
- Bytebase: Will auto detect slow queries and send weekly summary report. Provide an AI-based index advisor to provide query optimization advice.
Data access control, security and compliance
Flyway: Not supported.
Bytebase supports RBAC, e.g. developers need to require permission to access or export databases via SQL Editor.
Everything that happened within Bytebase will be recorded for audit purposes.
To summarize, Bytebase and Flyway are both viable options for database CI/CD. Flyway deliver its feature via its CLI, while Bytebase offers a GUI-based collaboration space.
As an analogy, Flyway is Git for database, and Bytebase is GitHub/GitLab for database. Git is good for local and personal use. On the other hand, for team development which needs collaboration, review, access control and etc, GitHub/GitLab is more suitable.