Flyway可以从数据模型中找出并生成迁移文件吗? [英] Can Flyway find out and generate migration files from datamodel?

查看:55
本文介绍了Flyway可以从数据模型中找出并生成迁移文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好! :)

我一直在研究Flyway,但不确定如何使用它.就我而言,我有一个实体模型(使用JPA注释),对我来说,有用的是,每当我调用迁移"并生成迁移文件时,FlyWay都可以找出模型上的更改.这就是Rails的工作方式(Rails使用DSL,但我希望您理解我的意思).正如我在Wiki中阅读的那样,Flyway不能以这种方式工作,但需要迁移文件(sql或Java).

I have been having a look at Flyway but I am not sure about how I can use it. In my case, I have an entity model (annotated using JPA) and, for me, the useful it would be that FlyWay could find out the changes on my model every time I call "migration" and generate the migration files. That is the way such as Rails works (Rails uses a DSL but I hope you understand what I mean). As I have read in the wiki, Flyway does not work in that way but needs the migration files (sql or Java).

如果我将Flyway集成到我的应用程序中(以编程方式),我可以生成那些迁移文件吗?我认为答案是否",那样只能让我控制从Java代码的迁移. 我说的对吗?

If I integrated Flyway in my application (programmatic), could I generate those migration files? I think the answer is "no", that way only would give me control over migrations from Java code. Am I right?

先谢谢您了:)

推荐答案

当前不支持此功能.

随时在问题跟踪器中提交请求: https://github.com /flyway/flyway/issues?state = open

Feel free to file a request in the issue tracker: https://github.com/flyway/flyway/issues?state=open

这篇关于Flyway可以从数据模型中找出并生成迁移文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆