We are using Flyway to keep up-to-date many databases in our test environments with sql scripts and it works fine. But we have a special need to also update databases with csv files. I know Flyway offers some Java based migrations to handle more complicated updates. But the problem is that these Java classes have the wanted version in their names, that would oblige us to recompile the class each time we want to use it. It would be more simple if we could drop our csv files in migration directories exactly like we do with sql files. Then some specific Java code would handle these csv files to do the right update. So how can we extend Flyway with this specific code that would handle our csv files ? Thanks
Asked
Active
Viewed 4,297 times
1 Answers
1
There is currently no support this. Sounds like the same issue as https://github.com/flyway/flyway/issues/469
I am still not sure how to resolve this without exposing too much of Flyway's internals.

Axel Fontaine
- 34,542
- 16
- 106
- 137
-
I just need in fact a new CsvMigrationExecutor class. It could be defined in flyway.properties in this way : - add a key flyway.extensions=csv (i.e. a list of extensions) For each extension, define some other keys : - flyway.csvMigrationPrefix (default "V") and flyway.csvMigrationSuffix (default the extension name) - flyway.csvMigrationExecutorClass (name of class implementing MigrationExecutor to do the specific migration) The MigrationResolver class could be a default one based on SqlMigrationResolver – Patrice Favre Jul 29 '13 at 15:27