本文介绍了Flyway信息屏幕状态为未来,不失踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于需要交换一些公司特定的功能,有时我迁移了脚本,这些脚本在以后运行"info"或"migrate"时在sql目录中不存在.不过,我只是发现显示方式不一致:

Due to a few company-specific features, which I need to swap in and out, I sometimes have migrated scripts which are not present in the sql directory when I run "info" or "migrate" at a later time. I just noticed an inconsistency, though, in how this displays:

+----------------+----------------------------+---------------------+---------+
| Version        | Description                | Installed on        | State   |
+----------------+----------------------------+---------------------+---------+
...
| 4.1            | Add new reports synonyms   | 2013-05-31 16:38:22 | Success |
| 4.1.1          | BRNC Add new reports synon | 2013-05-31 16:38:22 | Missing |
| 4.2            | Convert old DATA to DATA2  | 2013-05-31 16:38:22 | Success |
| 4.2.1          | BRNC Convert old DATA to D | 2013-05-31 16:38:22 | Future  |
+----------------+----------------------------+---------------------+---------+

因此,成功"表示脚本已运行,而缺少"则表示脚本已运行且不再存在.但是未来"是什么意思?

So, "Success" means that scripts have been run, and "Missing" means they were run and are no longer present. But what does "Future" mean?

这与问题类似但不相同:

This is similar but not identical to a question:

迁移脚本的状态为未来"

这从来没有得到正式答复,但是Axel Fontaine在评论中说这已经得到解决.我检查了一下,发现罐子(3/18)比他的评论(3/2)晚了.

which was never officially answered, but where Axel Fontaine said in a comment that this had been fixed. I checked, and my jars (3/18) are a later date than his comment (3/2).

推荐答案

目前的含义是:

  • 缺少->已执行,在配置的位置中找不到,比最新发现的脚本
  • 未来->已执行,不再在配置的位置找到,比最新发现的脚本更新
  • missing -> executed, no longer found in configured locations, older than the newest found script
  • future -> executed, no longer found in configured locations, newer than the newest found script

尽管考虑一下,但我觉得在信息结果中,这种微小的区别可能不值得单独提出.我将在2.2之前及时进行重新讨论.

Coming to think of it though, I feel this minor distinction might not be worth a separate state in the info results. I will revisit this in time for 2.2.

这篇关于Flyway信息屏幕状态为未来,不失踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 00:08