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 ...
随机推荐
- TCP协议的基本规则和在Java中的使用
TCP协议是面向连接的,相对于UDP协议来说效率较低,但是比较安全,数据不容易丢失.TCP协议类似打电话的过程,在一端拨号时必须等待对方回应,确定两端建立了连接通道才能传送信息. 在Java中TCP被 ...
- 【Android N 7.1.1】 屏幕亮和灭的处理地方
frameworks/base/services/core/java/com/android/server/display/DisplayPowerController.java private vo ...
- POJ3259-负权回路判定
题目:http://vj.acmclub.cn/contest/view.action?cid=316#problem/E 首先要理解题意:其实就是给你一个图让你判断有没有负权回路 因此直接用Ball ...
- codevs 5967 [SDOI2017]相关分析
[题解] /* WA://50分 last:(r-l+1)<-- (r-mid) (r-l+1)<-- (mid-l+1) now:int mid=l+r>>1; tr[l ...
- Egret5.2.2 微信小游戏行的示例排行榜
Egret5.2.2版本发布微信小游戏后,在开放数据域有一个默认排行榜.这个文件夹代码+图大小就22kb. 排行榜的效果就是示范用的,很丑...带翻页. 代码如下,基本就是使用canvas渲染了一个排 ...
- mysql字符串根据指定字符分割
1.分割函数:SUBSTRING_INDEX('浙江温州-中国电信','-','1') 2.用例(筛选'-'前至少4个汉字的数据) a.数据分布 b.筛选sql select t.mobile_num ...
- 沈阳网络赛G-Spare Tire【容斥】
17.64% 1000ms 131072K A sequence of integer \lbrace a_n \rbrace{an} can be expressed as: \display ...
- Python开发【Django】:日志记录、API认证
日志记录: 调用同一个对象,分别记录错误日志和运行日志 自定义日志类: class Logger(object): __instance = None def __init__(self): self ...
- Git学习-->如何通过Shell脚本实现 监控Gitlab备份整个过程并且通过邮件通知得到备份结果?
一.背景 Git学习–>如何通过Shell脚本自动定时将Gitlab备份文件复制到远程服务器? http://blog.csdn.net/ouyang_peng/article/details/ ...
- DrawLayout使用侧滑抽屉
布局:fg_left_drawer <?xml version="1.0" encoding="utf-8"?> <LinearLayout ...