使用CSV文件的特定于Flyway的迁移 [英] Flyway specific migration with csv files
问题描述
我们正在使用Flyway来通过sql脚本在我们的测试环境中更新许多数据库,并且它运行良好. 但是,我们还特别需要使用csv文件更新数据库. 我知道Flyway提供了一些基于Java的迁移来处理更复杂的更新. 但是问题在于这些Java类的名称中都有所需的版本,这使我们不得不在每次使用该类时重新编译该类. 如果我们像将sql文件一样完全放到迁移目录中的csv文件,将会更简单. 然后,一些特定的Java代码将处理这些csv文件以进行正确的更新. 那么,如何使用此可处理csv文件的特定代码扩展Flyway? 谢谢
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
推荐答案
当前不支持此功能.听起来与 https://github.com/flyway/flyway/issues/469 相同a>
There is currently no support this. Sounds like the same issue as https://github.com/flyway/flyway/issues/469
我仍然不确定如何在不暴露Flyway内部太多的情况下解决这个问题.
I am still not sure how to resolve this without exposing too much of Flyway's internals.
这篇关于使用CSV文件的特定于Flyway的迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!