Tutorial - Add a new versioned migration script with data changes to the project folder
Published 24 January 2025
If you need to add a versioned migration script that doesn't correspond with any table schema changes (e.g., updating some transactional data), you can use the Migrations tab to add additional migration scripts to your project. This automatically picks up the next Version name for you.
Or, you can navigate to the project folder using the blue folder icon in Flyway Desktop and create or save your change script in the migrations directory using the correct filename. Make sure the filename starts with a capital V, the number, which corresponds to the order you want it executed in, two underscores, and then a description, e.g., V003_20201022__UpdatingJobTitles.sql
.
If you are using Undo scripts, make sure you add a U script as well to back out these changes as fit for your environment. In some cases, you might not want/need to undo the data changes.
Add a new migration and enter any SQL necessary to handle the data logic.