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 ...
随机推荐
- str += "a" + "b" & str = str + "a" + "b"的性能比较
str += "a" + "b"在浏览器中的执行过程: 1.创建临时字符串, 2.将临时字符串设置为“ab”, 3.将临时字符串和str进行连接, 4.将结果赋 ...
- vux 头像上传
参考: http://blog.csdn.net/generon/article/details/72478269
- HDCMS做异步加载!
控制器的写法: //ajax 请求新闻列表 public function ajaxnewsList(){ $data = Q('sum'); $newsList = M('xinwen')-> ...
- oneThink发生错误,获取当前执行的SQL语句!
echo D('AnswerInfoView')->getLastSql();die();
- Linux系统下 Supervisor 安装搭建(yum安装)
安装Supervisor # 安装supervisor yum install supervisor # 打开supervisor的配置文件 vi /etc/supervisord.conf 将sup ...
- php 常用的系统函数
字符串函数 strlen:获取字符串长度,字节长度 substr_count 某字符串出现的次数 substr:字符串截取,获取字符串(按照字节进行截取) mb_strlenmb_substr str ...
- nginx中文乱码问题
搭建nginx成功后,在页面中写入了中文字幕,结果发现乱码 于是修改了nginx配置文件nginx.conf:如下 server { listen ; server_name example.com; ...
- nginx软件的编译安装步骤
1.1 检查软件安装的系统环境 [root@web02 conf]# cat /etc/redhat-release CentOS release 6.8 (Final) [root@web02 co ...
- zabbix_server部署,启动,及端口未监听问题
安装 下载地址:wget https://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.2.6/zabbix-3 ...
- 170802、Elasticsearch5.2.2 安装问题记录
使用Elasticsearch5.2.2 必须安装jdk1.8 [elsearch@vm-mysteel-dc-search01 bin]$ java -version java version &q ...