flyway-Maven插件-configuration节点配置详解
<configuration>
<driver>org.hsqldb.jdbcDriver</driver>
<url>jdbc:hsqldb:file:${project.build.directory}/db/flyway_sample;shutdown=true</url>
<user>SA</user>
<password>mySecretPwd</password>
<schemas>
<schema>schema1</schema>
<schema>schema2</schema>
<schema>schema3</schema>
</schemas>
<table>schema_history</table>
<locations>
<location>classpath:migrations1</location>
<location>migrations2</location>
<location>filesystem:/sql-migrations</location>
</locations>
<sqlMigrationPrefix>Migration-</sqlMigrationPrefix>
<sqlMigrationSeparator>__</sqlMigrationSeparator>
<sqlMigrationSuffix>-OK.sql</sqlMigrationSuffix>
<encoding>ISO-8859-1</encoding>
<placeholderReplacement>true</placeholderReplacement>
<placeholders>
<aplaceholder>value</aplaceholder>
<otherplaceholder>value123</otherplaceholder>
</placeholders>
<placeholderPrefix>#[</placeholderPrefix>
<placeholderSuffix>]</placeholderSuffix>
<resolvers>
<resolver>com.mycompany.project.CustomResolver</resolver>
<resolver>com.mycompany.project.AnotherResolver</resolver>
</resolvers>
<callbacks>
<callback>com.mycompany.project.CustomCallback</callback>
<callback>com.mycompany.project.AnotherCallback</callback>
</callbacks>
<target>1.1</target>
<outOfOrder>false</outOfOrder>
<validateOnMigrate>true</validateOnMigrate>
<cleanOnValidationError>false</cleanOnValidationError>
<baselineOnMigrate>false</baselineOnMigrate>
<baselineVersion>5</baselineVersion>
<baselineDescription>Let's go!</baselineDescription>
<skip>false</skip>
<configFile>myConfig.properties</configFile>
</configuration>
Parameter | Required | Default | Description |
---|---|---|---|
url | YES | The jdbc url to use to connect to the database | |
driver | NO | Auto-detected based on url | The fully qualified classname of the jdbc driver to use to connect to the database |
serverId | NO | flyway-db | The id of the server in the Maven settings.xml file to load the credentials from.
This is an alternative to passing the credentials in directly through properties. |
user | NO | The user to use to connect to the database | |
password | NO | The password to use to connect to the database | |
schemas | NO | default schema of the connection | Case-sensitive list of schemas managed by Flyway. The first schema in the list will be automatically set as the default one during the migration. It will also be the one containing the metadata table. |
table | NO | schema_version | The name of Flyway's metadata table. By default (single-schema mode) the metadata table is placed in the default schema for the connection provided by the datasource. When the flyway.schemas property is set (multi-schema mode), the metadata table is placed in the first schema of the list. |
locations | NO | db/migration | Locations to scan recursively for migrations. The location type is determined by its prefix. Unprefixed locations or locations starting with classpath: point to a package on the classpath and may contain both sql and java-based migrations.Locations starting with filesystem: point to a directory on the filesystem and may only contain sql migrations. |
sqlMigrationPrefix | NO | V | The file name prefix for Sql migrations |
sqlMigrationSeparator | NO | __ | The file name separator for Sql migrations |
sqlMigrationSuffix | NO | .sql | The file name suffix for Sql migrations |
encoding | NO | UTF-8 | The encoding of Sql migrations |
placeholderReplacement | NO | true | Whether placeholders should be replaced |
placeholders | NO | Placeholders to replace in Sql migrations | |
placeholderPrefix | NO | ${ | The prefix of every placeholder |
placeholderSuffix | NO | } | The suffix of every placeholder |
resolvers | NO | Fully qualified class names of customMigrationResolver implementations to be used in addition to the built-in ones for resolving Migrations to apply. | |
callbacks | NO | Fully qualified class names ofFlywayCallback implementations to use to hook into the Flyway lifecycle. | |
target | NO | latest version | The target version up to which Flyway should run migrations. Migrations with a higher version number will not be applied. The string 'current' will be interpreted as MigrationVersion.CURRENT, a placeholder for the latest version that has been applied to the database. |
outOfOrder | NO | false | Allows migrations to be run "out of order".
If you already have versions 1 and 3 applied, and now a version 2 is found, it will be applied too instead of being ignored. |
validateOnMigrate | NO | true | Whether to automatically call validate or not when running migrate. For each sql migration a CRC32 checksum is calculated when the sql script is executed. The validate mechanism checks if the sql migration in the classpath still has the same checksum as the sql migration already executed in the database. |
cleanOnValidationError | NO | false | Whether to automatically call clean or not when a validation error occurs.
This is exclusively intended as a convenience for development. Even tough we strongly recommend not to change migration scripts once they have been checked into SCM and run, this provides a way of dealing with this case in a smooth manner. The database will be wiped clean automatically, ensuring that the next migration will bring you back to the state checked into SCM. Warning ! Do not enable in production ! |
baselineOnMigrate | NO | false | Whether to automatically call baseline when migrate is executed against a non-empty schema with no metadata table. This schema will then be baselined with the baselineVersion before executing the migrations. Only migrations abovebaselineVersion will then be applied.
This is useful for initial Flyway production deployments on projects with an existing DB. Be careful when enabling this as it removes the safety net that ensures Flyway does not migrate the wrong database in case of a configuration mistake! |
baselineVersion | NO | 1 | The version to tag an existing schema with when executing baseline |
baselineDescription | NO | << Flyway Baseline >> | The description to tag an existing schema with when executing baseline |
skip | NO | false | Skips the execution of the plugin for this module |
configFile | NO | flyway.properties | Properties file from which to load the Flyway configuration. The names of the individual properties match the ones you would use as Maven or System properties. The encoding of the file must be the same as the encoding defined with the flyway.encoding property, which is UTF-8 by default. Relative paths are relative to the POM. |
flyway-Maven插件-configuration节点配置详解的更多相关文章
- [maven] settings 文件节点配置详解
基本结构 <settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3. ...
- Maven项目pom.xml配置详解
maven项目pom.xml文件配置详解,需要时可以用作参考: <project xmlns="http://maven.apache.org/POM/4.0.0" xmln ...
- Maven的settings.xml配置详解
子节点详细介绍转载:http://www.cnblogs.com/jingmoxukong/p/6050172.html?utm_source=gold_browser_extension 全局配置 ...
- Maven系列--setting.xml 配置详解
文件存放位置 全局配置: ${M2_HOME}/conf/settings.xml 用户配置: ${user.home}/.m2/settings.xml note:用户配置优先于全局配置.${use ...
- maven setting.xml 中文配置详解(全配置)
春节假期在家养病,乘有时间整理了下之前的知识——知识贵在归纳总结. 参照了官方文档,针对其中的一些未描述详尽的内容翻查了不少资料,补充到了配置文件中,同时再加上一些说明.例子,方便查阅. 内容虽然比较 ...
- Maven之setting.xml 配置详解
文件存放位置 全局配置: ${M2_HOME}/conf/settings.xml 用户配置: ${user.home}/.m2/settings.xml note:用户配置优先于全局配置.${use ...
- Maven中setting.xml 配置详解
文件存放位置 全局配置: ${M2_HOME}/conf/settings.xml 用户配置: ${user.home}/.m2/settings.xml note:用户配置优先于全局配置.${use ...
- Maven系列--web.xml 配置详解
一 .web.xml介绍 启动一个WEB项目的时候,WEB容器会去读取它的配置文件web.xml,读取<listener>和<context-param>两个结点. 紧接着,容 ...
- Maven的pom.xml 配置详解
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...
随机推荐
- springDao的jdbctemplate
pom文件 <?xml version="1.0" encoding="UTF-8"?><project xmlns="http:/ ...
- linux 系统启动
系统启动流程 BIOS 我们称之为基本输入输出系统,一般保存在主板上的BIOS芯片中,负责检查硬件并且查找可启动设备:可设置启动顺序: 如果一个设备是可启动,那么第一个扇区512字节的最后两字节是55 ...
- 基于JSP+Servlet开发高校社团管理系统(前台+后台) 源码
基于JSP+Servlet开发高校社团管理系统(前台+后台): 开发环境: Windows操作系统 开发工具:Eclipse/MyEclipse+Jdk+Tomcat+MYSQL数据库 运行效果 ...
- docker+selenium Grid搭建自动化分布式测试环境
自动化测试需要考虑到兼容性的时候,之前的做法是每个执行机上安装不同版本的浏览器,实际上这样做会很浪费硬件资源,现在有了docker容器化技术,让一切变得简单. 工具清单: 语言:python 2.7 ...
- Windows上编译Boost
Boost做得很好,有自己的build系统,可以几乎一键式编译,这才是尼玛世界一流质量的良心开源库啊. 将Boost 1.49.0解压到boost/boost_1_49_0里面,然后在boost目录底 ...
- 网易严选的wkwebview测试之路
本文来自网易云社区 作者:孙娇 UIWebView是苹果继承于UIView封装的一个加载web内容的类,它可以加载任何远端的web数据展示在你的页面上,你可以像浏览器一样前进后退刷新等操作.不过苹果在 ...
- Android学习之 adb被占用解决办法
1.adb被占用解决办法 方法一:(1)查看5037端口哪个进程在用 netstat -a -o 5037 (2)查看上面进程是哪个执行文件在占用 tasklist ...
- python之爬虫(二)爬虫的原理
在上文中我们说了:爬虫就是请求网站并提取数据的自动化程序.其中请求,提取,自动化是爬虫的关键!下面我们分析爬虫的基本流程 爬虫的基本流程 发起请求通过HTTP库向目标站点发起请求,也就是发送一个Req ...
- jquery源码解析:jQuery延迟对象Deferred(工具方法)详解2
请接着上一课继续看. $.Deferred()方法中,有两个对象,一个是deferred对象,一个是promise对象. promise对象有以下几个方法:state,always,then,prom ...
- c语言-勒让德多项式求解+时间测定
#include<iostream>#include<ctime>#include<cstdlib>using namespace std; float LRD(i ...