Flyway Tips: AI Generating Migration Script Names

AI is a big deal in 2026, and at Redgate, we’re experimenting with how AI can help developers and DBAs become better at their jobs. One of the areas we’ve started to add some AI is in Flyway Desktop (FWD), with a few features designed to help reduce the cognitive load and context switches needed while developing code, and help users better understand what changes they’re making in their systems.

I wrote about summaries of migrations scripts last week, which are helpful when you or your colleagues don’t generate good script names, or commit messages. This post looks at another of those changes, which is the generation of the script name.

I’ve been working with Flyway and Flyway Desktop for work more and more as we transition from older SSMS plugins to the standalone tool. This series looks at some tips I’ve gotten along the way.

Generating Complex Scripts

In Flyway, we call the deployment scripts “migration scripts”, but they are the same thing. These are scripts that are changing, altering, or evolving our database schema in some way. New or altered objects, various schema items, and more.

Our guidance for a lot of customers is to keep the migration scripts simple and easy. That can work, but sometimes we want to put a few things into a script to ensure that we deploy all the changes at once. In the last article, I had this list of changes in one script.

2026-01_0168_thumb[1]

I generated this in the last post with a poor name.

2026-01_0175

Let’s fix that.

Using the Power of AI

I’m going to delete that script and get my list of objects in the Generate tab. I’ll select a few, as shown below.

2026-01_0177

Now I’ll generate the script.When the script completes, I see my default “Steve” name for the description. However, look to the right. There’s a looping circle at the far right side of the Description box. I didn’t capture a good image, but it’s actually moving in a circle.

2026-01_0178

When it completes, I have a better description for my changes.

2026-01_0179

Let me save this and repeat it for the other changes to the customer tables.

2026-01_0180

That’s a way better description than I would typically write.

Enabling AI Features in Flyway

This is a preview feature as of Jan 5, 2026 as I write this. To get this in your FWD, your organization needs to have enabled AI features in your portal. I’m just a member, but whoever is an admin for your Redgate products would find it here.

2026-01_0173_thumb[1]

In FWD, you need to look at the Preview Features item under the config menu.

2026-01_0171_thumb

In this area, you can enable or disable features as needed. I see these marked as Red-gate only, but I think they are supposed to be released to some customers by this time. It’s likely I need to upgrade my FWD, which I’ll do when I have time.

2026-01_0172_thumb[1]

Once you do this, you should start seeing some AI stuff with the purple/pink shaded area and the sparkle icon that we’re all seeing everywhere.

2026-01_0174_thumb

Summary

Getting good migration script descriptions, or really any good descriptions, is hard. Developers get tired, they aren’t always creative, they forget things, and they sometimes just take the default.

Witness my repo.

2026-01_0181

This feature reduces the burden on developers and auto-generates a name for the file. It can be edited and changed, but the dev doesn’t have to.

This feature is documented, but we are likely to enhance and change it a bit, so all feedback is welcome. If your organization doesn’t want you using AI, and you could share some schema from a migration script, I’d be happy to test it for you and see what summary is produced and send it back to you. Ping me on X/LinkedIn/BlueSky if you want.

Flyway is an incredible way of deploying changes from one database to another, and now includes both migration-based and state-based deployments. You get the flexibility you need to control database changes in your environment. If you’ve never used it, give it a try today. It works for SQL Server, Oracle, PostgreSQL and nearly 50 other platforms.

Video Walkthrough

See a video of me looking at this feature below.

Posted in Blog | Tagged , , , , | 1 Comment

The Book of Redgate: Get the right stuff done

Another of our values:

2025-10_line0108

The facing page has this quote: “We admire people who get stuff done. While there’s a place for planning, thinking and process it is better to try – and try well – and fail than not to try at all.”

This is an approach I use in lots of my life. Not always, but I do try to get things done, and make a strong effort in doing so. I ask the kids I coach to do the same. The effort is what matters; it’s more important than the outcome. The outcomes matter, but we can accept mistakes.

This is one of those values I think ought to be more prominently displayed and discussed, in most organizations.

I have a copy of the Book of Redgate from 2010. This was a book we produced internally about the company after 10 years in existence. At that time, I’d been there for about 3 years, and it was interesting to learn a some things about the company. This series of posts looks back at the Book of Redgate 15 years later.

Posted in Blog | Tagged , , | 2 Comments

JSON Has a Cost

JSON seems to be everywhere these days. Many application developers like it across all sorts of languages, C#, JAVA, Python, and more. They use it for transferring information between systems, and are comfortable serializing hierarchical object data into JSON from text and de-serializing it back into its various elements.

For those of us working in relational databases, JSON seems like a blob of information that isn’t easily queried, indexed, or stored. We prefer working with a relational set of data, which brings us into conflict with software developers. We’d like them to convert their objects to a relational structure, and they’d like us to just work with JSON.

SQL Server has added new JSON functions in SQL Server 2025, expanding the JSON capabilities from previous versions. PostgreSQL has JSON types for a few versions, as has Oracle. Lots of applications are storing JSON data in databases. Unlike XML, however, JSON seems to be working well (overall) as a data storage mechanism.

Or is it?

At a recent conference, one of the speakers noted that we do a lot of data movement these days, and there can be a high cost to this as we pay for both compute and network. This data movement often incurs a query cost to get information from the source system. JSON can exacerbate this issue as we may send more data than necessary, and we might find our compute engines don’t support predicate pushdown. Even if we index the JSON, we might still end up querying more data from disks to get what we need. Especially as we move a lot of data to warehouses and lakehouses.

Using JSON can slow things down. It’s nice for storing a bunch of information quickly and easily, but as we need to work with specific parts of a JSON document, we would likely be better off de-serializing the important pieces into more structured formats that prevent duplication, are easily indexed, and can achieve quick query performance. Everything becomes a little smoother.

JSON is great, and I do like it, but it’s not a substitute for relational systems and relational models.

Steve Jones

Listen to the podcast at Libsyn, Spotify, or iTunes.

Note, podcasts are only available for a limited time online.

Posted in Editorial | Tagged , | Leave a comment

Renaming a Column: #SQLNewBlogger

This is a short post on how to rename a column in a SQL Server table.

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

I Typo’d a Name

I was testing something recently and created this table:

CREATE TABLE BinaryData
(
     BinaryDataID INT NOT NULL
         CONSTRAINT BinaryDataPK PRIMARY KEY,
     Emoji VARBINARY(16),
     UserPic VARBINARY(MAX),
     BinaryTexet VARBINARY(250)
)
GO

I didn’t realize at first that the last column was BinaryTexet and not BinaryText. I added data, wrote a few queries, and had done some testing. Using SQL Prompt is great, but it hid my silly mistake. As I went to send this code elsewhere, I realized my mistake.

I could have dropped the table, created a new one with the right name, saved the data or moved it, and done more, but that’s a lot of work. It also might cause me issues with the dependencies from other code. Not this column name, as any dependencies have to be fixed, but I could have other FKs or things that I don’t want to recreate.

I could, I mean I use version control and tools to make refactoring easy, but everything is more complex than renaming this column.

Renames

In SQL Server, we have an sp_rename function to handle this. I had hoped there was a way with ALTER TABLE ALTER COLUMN, but while I can change types, nulls, etc., I can’t change the name.

SQL is such a weird language.

Certainly for SQL Server. PostgreSQL and Oracle have an alter table rename column a to b in the DDL. We have a function. Vote for a cleanup here.

In any case, the syntax is: sp_rename <objname>, <newname>,<objtype>.

For me, the code is easy. I qualify out the old name:

EXEC sp_rename 'dbo.BinaryData.BinaryTexet', 'BinaryText', 'column'

If I try just the column name, even though this is unique in sys.columns, I get an error. I could do just the table and column like this:

EXEC sp_rename 'BinaryData.BinaryTexet', 'BinaryText', 'column'

One really interesting thing is that if I fully qualify things, I definitely don’t get what I want. Be careful here. Another reason why an ALTER TABLE RENAME COLUMN syntax should exist.

2025-12_0236

After all my experiments,  I can fix this:

EXEC sp_rename 'dbo.BinaryData.[dbo.BinaryData.BinaryTexet]', 'BinaryText'

SQL New Blogger

This was a short post I made after realizing I made a mistake. I took about 10 minutes to experiment with renames, and another 5 searching to be sure I couldn’t rename things.

In the experiment, I realized how I could break things, so I captured that mistake (and fixed it), and pointed it out. Showcase how you learn. For bonus points, write a blog where you use AI to help you do this.

Posted in Blog | Tagged , | Leave a comment