Product articles

Creating Custom Regex Rules for Code Analysis in Flyway

Every development team has its own coding standards. While Flyway provides built-in rules focused on security and data protection, teams quickly find they need additional checks to maintain SQL code quality and consistency across their projects. This article will walk through the ways of defining, testing and refining custom rules, and then explains how to manage them efficiently as your rule library grows. Read more

Getting Started with Flyway SQL Code Analysis Rules

Before you apply pending SQL migration scripts, Flyway can automatically check them for a range of code smells. The check -code command can perform a static code analysis on these scripts to check that they comply with a set of rules designed to encourage good coding practices. You can opt to use SQL Fluff, provide your own Regex rules, or use both. This article explains how Flyway's regex-based code checks work, their strengths and limitations and how to start running checks on Flyway-managed databases. Read more

Using JSON Output to Track and Log Flyway Migration Activity

Flyway's JSON output provides a lot of useful information about the migrations files, database, and version changes, in a format that automated processes can read and use. This article demonstrates how we can create a Flyway callback that uses this JSON output to automatically send simple, human-readable notifications of what happened during a migration, helping developers stay informed about version changes that could impact their work. Read more