Search code examples
mysqlflyway

Manually update schema_version table in Flyway


I've renamed some previously created migration files and would like to update Flyway's schema_version table to contain the new names for migrations which have already been applied.

I attempted to create a migration that simply updates the affected rows in the schema_version table, but running this migration causes the migration process to hang since the schema_version table is locked.

Is there a way to update data in the schema_version table using a migration?

I'm using MySQL.


Solution

  • No. It is always locked. This is part of the mechanics to prevent multiple competing nodes from migrating the DB in parallel.