https://flywaydb.org/documentation/faq

What is the best strategy for dealing with hot fixes?

You have a regular release schedule, say once per sprint. Version 7 is live and you are developing version 8. Version 8 contains DB Schema Changes. Suddenly hot fix is required for version 7, and it also needs a schema change.

How can you deal with this?

Even though the code may be branched, the database schema won't. It will have a linear evolution.

This means that the emergency fix, say version 7.1 needs to be deployed as part of the hot fix AND the new version 8.

By the time等到 version 8 will be deployed, Flyway will recognize that the migration version 7.1 has already be applied. It will ignore it and migrate to version 8.

When recreating the database, everything with be cleanly installed in order: version 7, 7.1 and 8.

If this isn't an option you can activate the outOfOrder property to allow Flyway to run the migrations out of order and fill the gaps.

Can I make structure changes to the DB outside of Flyway?

No. One of the prerequisites for being able to rely on the metadata in the database and having reliable migrations is that ALL database changes are made by Flyway. No exceptions. The price for this reliability is discipline纪律. Ad hoc 特别的changes have no room here as they will literally sabotage妨害 your confidence. Even simple things like adding an index can trip over a migration if it has already been added manually before.

How do you repair the database after a failed migration?

If your database supports DDL transactions, Flyway does the work for you.

If your database doesn't, these are the steps to follow:

  1. Manually undo the changes of the migration
  2. Invoke the repair command
  3. Fix the failed migration
  4. Try again

Why is the flyway_schema_history table case-sensitive?

The flyway_schema_history is case-sensitive due to the quotes used in its creation script. This allows for characters not supported in identifiers otherwise.

The name (and case) can be configured through the flyway.table property.

The table is an internal Flyway implementation detail and not part of the a public API. It can therefore change from time to time.

FAQ Flyway的更多相关文章

  1. Flyway学习笔记

    Flyway做为database migration开源工具,功能上像是git.svn这种代码版本控制.google搜索database migration,或者针对性更强些搜索database mi ...

  2. 生产环境中,数据库升级维护的最佳解决方案flyway

    官网:https://flywaydb.org/ 转载:http://casheen.iteye.com/blog/1749916 1.  引言 想到要管理数据库的版本,是在实际产品中遇到问题后想到的 ...

  3. Google软件构建工具Bazel FAQ

    Google软件构建工具Bazel FAQ 本文是我的翻译,原文在这里.欢迎转载,转载请注名本文作者和原始链接 注:如果想了解Bazel的原理,可以看看我之前翻译的Google Blaze原理及使用方 ...

  4. 领域驱动设计常见问题FAQ

    本文出处:http://www.cqrs.nu/Faq What is a domain? The field for which a system is built. Airport managem ...

  5. CQRS FAQ (翻译)

    我从接触ddd到学习cqrs有6年多了, 其中也遇到了不少疑问, 也向很多的前辈牛人请教得到了很多宝贵的意见和建议. 偶尔的机会看到国外有个站点专门罗列了ddd, cqrs和事件溯源的常见问题. 其中 ...

  6. (译)关于async与await的FAQ

    传送门:异步编程系列目录…… 环境:VS2012(尽管System.Threading.Tasks在.net4.0就引入,在.net4.5中为其增加了更丰富的API及性能提升,另外关键字”async” ...

  7. Async/Await FAQ

    From time to time, I receive questions from developers which highlight either a need for more inform ...

  8. Unity3D热更新全书FAQ

    只要有程序员朋友们问过两次的问题 就会收录在此FAQ中 1.C#Light对比LUA有什么好处 C#Light是静态类型脚本语言,语法同C#,Lua是动态类型脚本语言,这两种都有人喜欢. 我更喜欢静态 ...

  9. Flyway, 数据库Schema管理利器

    整天跟数据库打交道的程序员都知道,当数据库的Schema发生改变时是多么痛苦的事情.尤其是一个在不断开发完善的项目,随着需求变化,数据库的schema也会跟着变化,而追踪记录这些变化一向都是费时费力. ...

随机推荐

  1. <1>lua编译环境 数据类型和局部变量

    1.编译环境 http://www.lua.org/download.html下载 解压后 bin目录中lua.exe运行   luac.exe编译成lua字节码 2.基本数据类型 整数,小数,布尔值 ...

  2. Shader1.0学习笔记之SetTexture

    1.语法 SetTexture [TextureName] {Texture Block} 2.Texture block combine 命令 combine src1 *  src2 越乘越暗 c ...

  3. Cipher

    Description Bob and Alice started to use a brand-new encoding scheme. Surprisingly it is not a Publi ...

  4. samba共享目录无法访问的一般解决方案,非用户登录和读写权限问题

    配smb,被第四点坑了很久,特此转载. 由于这5点都是比较普通的情况,不涉及用户登录和读写权限问题 1)关闭防火墙: #sevice iptables stop 2)修改 /etc/samba/smb ...

  5. 基于word2vec训练词向量(二)

    转自:http://www.tensorflownews.com/2018/04/19/word2vec2/ 一.基于Hierarchical Softmax的word2vec模型的缺点 上篇说了Hi ...

  6. 关于SqlCommand对象的2个方法:ExecuteNonQuery 方法和ExecuteScalar方法

    1.SqlCommand.ExecuteNonQuery 方法 对连接执行 Transact-SQL 语句并返回受影响的行数. 语法:public override int ExecuteNonQue ...

  7. 人工智能深度学习框架MXNet实战:深度神经网络的交通标志识别训练

    人工智能深度学习框架MXNet实战:深度神经网络的交通标志识别训练 MXNet 是一个轻量级.可移植.灵活的分布式深度学习框架,2017 年 1 月 23 日,该项目进入 Apache 基金会,成为 ...

  8. ORM some

    1 -- 增 models.表名(类).objects.create(字段1=值,字段2=值) 查 models.表名(类).objects.get(pk = 3) models.表名(类).obje ...

  9. Django框架----用户认证auth模块

    一.auth模块 auth模块:针对auth_user表 创建超级管理用户命令: Python manage.py createsuperuser添加用户名添加密码(至少8位)确认密码添加邮箱(可为空 ...

  10. Logstash 安装和使用

    下载地址 https://artifacts.elastic.co/downloads/logstash/logstash-5.6.8.zip 下载后解压,测试 #将键盘内容输出到控制台 logsta ...