How does flyway sort version numbers?
https://stackoverflow.com/questions/19984397/how-does-flyway-sort-version-numbers
In one word: numerically. As would be expected for a number.
https://flywaydb.org/documentation/migrations#versioned-migrations
Versioned Migrations
The most common type of migration is a versioned migration. Each versioned migration has a version, a description and a checksum. The version must be unique. The description is purely informative for you to be able to remember what each migration does. The checksum is there to detect accidental changes. Versioned migrations are applied in order exactly once.
Versioned migrations are typically used for:
- Creating/altering/dropping tables/indexes/foreign keys/enums/UDTs/…
- Reference data updates
- User data corrections
Here is a small example:
CREATE TABLE car (
id INT NOT NULL PRIMARY KEY,
license_plate VARCHAR NOT NULL,
color VARCHAR NOT NULL
);
ALTER TABLE owner ADD driver_license_id VARCHAR;
INSERT INTO brand (name) VALUES ('DeLorean');
Each versioned migration must be assigned a unique version. Any version is valid as long as it conforms to the usual dotted notation. For most cases a simple increasing integer should be all you need. However Flyway is quite flexible and all these versions are valid versioned migration versions:
- 1
- 001
- 5.2
- 1.2.3.4.5.6.7.8.9
- 205.68
- 20130115113556
- 2013.1.15.11.35.56
- 2013.01.15.11.35.56
Versioned migrations are applied in the order of their versions. Versions are sorted numerically as you would normally expect.
How does flyway sort version numbers?的更多相关文章
- [LeetCode] Compare Version Numbers 版本比较
Compare two version numbers version1 and version1.If version1 > version2 return 1, if version1 &l ...
- 【leetcode】Compare Version Numbers
题目描述: Compare two version numbers version1 and version2. If version1 > version2 return 1, if vers ...
- Compare Version Numbers
Compare two version numbers version1 and version1. If version1 > version2 return 1, if version1 & ...
- 【leetcode】Compare Version Numbers(middle)
Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 &l ...
- ✡ leetcode 165. Compare Version Numbers 比较两个字符串数字的大小 --------- java
Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 &l ...
- Java for LeetCode 165 Compare Version Numbers
Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 &l ...
- LeetCode Compare Version Numbers
原题链接在这里:https://leetcode.com/problems/compare-version-numbers/ 用string.split()方法把原有string 从小数点拆成 str ...
- leetcode:Compare Version Numbers
Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 &l ...
- 【LeetCode】165 - Compare Version Numbers
Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 &l ...
随机推荐
- Android 查看每个应用的最大可用内存
http://blog.csdn.net/vshuang/article/details/39647167 Android 内存管理 &Memory Leak & OOM 分析 ...
- console输出图案
探索天猫控制台下的图案是怎么制作的 通过它的源码找到以下代码(还原解压代码) 自己也照葫画瓢搞了个以前公司的logo
- EUI组件之EditableText
一.EditableText常规使用 EditableText是一个可输入文本,例如登陆时输入用户名.密码等. 拖动EditableText到exml即可 实际效果 其他: 1.输入密码框 设置inp ...
- java对象转化成String类型
在java项目的实际开发和应用中,常常需要用到将对象转为String这一基本功能.本文将对常用的转换方法进行一个总结.常用的方法有Object#toString(),(String)要转换的对象,St ...
- 学习c++的50条忠告(转自C++百度贴吧)
1.把C++当成一门新的语言学习(和C没啥关系!真的.): 2.看<Thinking In C++>,不要看<C++变成死相>: 3.看<The C++ Programm ...
- 170529、springMVC 的工作原理和机制
工作原理上面的是springMVC的工作原理图: 1.客户端发出一个http请求给web服务器,web服务器对http请求进行解析,如果匹配DispatcherServlet的请求映射路径(在web. ...
- EasyUI之Layout布局和Tabs页签的使用
1.JQuery EasyUI之LayOut布局 EasyUI是一款基于JQuery开发的前端框架,它集成很多漂亮的样式和相应的功能,大大方便了我们对前端开发的难度.对于web项目而言,主页面的一定是 ...
- ubuntu16.04下安装opencv-nonfree
在写计算机视觉与导航技术的课程作业,是关于sift和surf特征的提取及匹配.因为opencv中都有直接的函数可以调用. 关于SIFT和SURF的特征在opencv的nonfree模块中,从字面意思就 ...
- Ubuntu proxychains && setProxy及 unsetProxy
https://www.socks-proxy.net/ (ubuntu proxy )[ lantern -addr 0.0.0.0:8787 proxychains4 printenv http: ...
- 介绍一个Redis的WEB 客户端
http://webd.is/ $ git clone git://github.com/nicolasff/webdis.git $ cd webdis$ make$ ...