Can Flyway execute SQL scripts that are not treated as migrations?
flyway, maven, sql-scripts
Solution
With Flyway's support for loading scripts from multiple locations, you configure in such a way that it only loads a set of reference or test data in certain environments, but not in others.
You will have to give these scripts a version, but that shouldn't be too much of an issue as they depend on the underlying DB structure being present anyway.
Problem
We would like to use Flyway for database migrations. In addition to our migration scripts, we have a need to execute some scripts that should not be treated as migrations (and do not need to be tracked in the schema_version table). An example would be to execute scripts that contain configuration data or test data that is only relevant in development environments. We would still like to use the flyway-maven-plugin to execute these SQL scripts rather than a different maven plugin that runs before/after my flyway-maven-plugin. A similar question was asked about pre and post migration scripts for flyway. If this feature was implemented, it could work for our needs as well.