FAQ Flyway
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:
- Manually undo the changes of the migration
- Invoke the repair command
- Fix the failed migration
- 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的更多相关文章
- Flyway学习笔记
Flyway做为database migration开源工具,功能上像是git.svn这种代码版本控制.google搜索database migration,或者针对性更强些搜索database mi ...
- 生产环境中,数据库升级维护的最佳解决方案flyway
官网:https://flywaydb.org/ 转载:http://casheen.iteye.com/blog/1749916 1. 引言 想到要管理数据库的版本,是在实际产品中遇到问题后想到的 ...
- Google软件构建工具Bazel FAQ
Google软件构建工具Bazel FAQ 本文是我的翻译,原文在这里.欢迎转载,转载请注名本文作者和原始链接 注:如果想了解Bazel的原理,可以看看我之前翻译的Google Blaze原理及使用方 ...
- 领域驱动设计常见问题FAQ
本文出处:http://www.cqrs.nu/Faq What is a domain? The field for which a system is built. Airport managem ...
- CQRS FAQ (翻译)
我从接触ddd到学习cqrs有6年多了, 其中也遇到了不少疑问, 也向很多的前辈牛人请教得到了很多宝贵的意见和建议. 偶尔的机会看到国外有个站点专门罗列了ddd, cqrs和事件溯源的常见问题. 其中 ...
- (译)关于async与await的FAQ
传送门:异步编程系列目录…… 环境:VS2012(尽管System.Threading.Tasks在.net4.0就引入,在.net4.5中为其增加了更丰富的API及性能提升,另外关键字”async” ...
- Async/Await FAQ
From time to time, I receive questions from developers which highlight either a need for more inform ...
- Unity3D热更新全书FAQ
只要有程序员朋友们问过两次的问题 就会收录在此FAQ中 1.C#Light对比LUA有什么好处 C#Light是静态类型脚本语言,语法同C#,Lua是动态类型脚本语言,这两种都有人喜欢. 我更喜欢静态 ...
- Flyway, 数据库Schema管理利器
整天跟数据库打交道的程序员都知道,当数据库的Schema发生改变时是多么痛苦的事情.尤其是一个在不断开发完善的项目,随着需求变化,数据库的schema也会跟着变化,而追踪记录这些变化一向都是费时费力. ...
随机推荐
- 15. 3Sum(字典)
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find ...
- d'jang基础
1,建立一个名为guest的django项目,django-admin startproject guest 生成一个guest文件夹,包含一个guest文件夹和一个manage.py cd gue ...
- php高并发,大流量
一般使用LVS+PHP集群(1000台),就算日均80亿次请求,每秒有10万并发,那分到每台机器的请求只有100个.只要你的PHP程序不是太差,100QPS总没问题吧? 而真正的瓶颈在于数据库和存储系 ...
- hdu4784
题意: 给了一个图 从1号节点走到N号节点,然后,每个地方有买卖盐的差价,然后求 到达N的最大价值,一旦走到N这个点就不能再走了,或者走到不能再别的世界走1和N这两个点,然后接下来 用一个 四维的数组 ...
- linux基础操作
1.pwd 2.clear 3.who 4.cal 5.uname 6.wc 7.man在线帮助命令 8.--help.info.whatis 9.使用su命令以root身份进入linux 10.Sh ...
- NSOperation、NSOperationQueue(II)
NSOperationQueue 控制串行执行.并发执行 NSOperationQueue 创建的自定义队列同时具有串行.并发功能 这里有个关键属性 maxConcurrentOperationCou ...
- python 文件路径名,文件名,后缀名的操作
需要使用路径名来获取文件名,目录名,绝对路径等等. 使用os.path 模块中的函数来操作路径名.下面是一个交互式例子来演示一些关键的特性: >>> import os >&g ...
- localStorage过期策略
localStorage过期策略 由于html5没有给本地存储设置过期策略,那么在处理数据的过期策略的时候可以编写自己过期策略程序,如下: <!DOCTYPE> <head> ...
- msyql -3m架构详解
我们先来回顾一下mmm的概念,它是一套灵活的基于perl编写的脚本程序,自己本身不提供mysql服务的功能,它是用来对mysql replication 进行监控和故障迁移,并能管理mysql Mas ...
- Python爬虫【五】Scrapy分布式原理笔记
Scrapy单机架构 在这里scrapy的核心是scrapy引擎,它通过里面的一个调度器来调度一个request的队列,将request发给downloader,然后来执行request请求 但是这些 ...