<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节点配置详解的更多相关文章

  1. [maven] settings 文件节点配置详解

    基本结构 <settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3. ...

  2. Maven项目pom.xml配置详解

    maven项目pom.xml文件配置详解,需要时可以用作参考: <project xmlns="http://maven.apache.org/POM/4.0.0" xmln ...

  3. Maven的settings.xml配置详解

    子节点详细介绍转载:http://www.cnblogs.com/jingmoxukong/p/6050172.html?utm_source=gold_browser_extension 全局配置 ...

  4. Maven系列--setting.xml 配置详解

    文件存放位置 全局配置: ${M2_HOME}/conf/settings.xml 用户配置: ${user.home}/.m2/settings.xml note:用户配置优先于全局配置.${use ...

  5. maven setting.xml 中文配置详解(全配置)

    春节假期在家养病,乘有时间整理了下之前的知识——知识贵在归纳总结. 参照了官方文档,针对其中的一些未描述详尽的内容翻查了不少资料,补充到了配置文件中,同时再加上一些说明.例子,方便查阅. 内容虽然比较 ...

  6. Maven之setting.xml 配置详解

    文件存放位置 全局配置: ${M2_HOME}/conf/settings.xml 用户配置: ${user.home}/.m2/settings.xml note:用户配置优先于全局配置.${use ...

  7. Maven中setting.xml 配置详解

    文件存放位置 全局配置: ${M2_HOME}/conf/settings.xml 用户配置: ${user.home}/.m2/settings.xml note:用户配置优先于全局配置.${use ...

  8. Maven系列--web.xml 配置详解

    一 .web.xml介绍 启动一个WEB项目的时候,WEB容器会去读取它的配置文件web.xml,读取<listener>和<context-param>两个结点. 紧接着,容 ...

  9. Maven的pom.xml 配置详解

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...

随机推荐

  1. select, iocp, epoll,kqueue及各种I/O复用机制

    http://blog.csdn.net/heyan1853/article/details/6457362 首先,介绍几种常见的I/O模型及其区别,如下: blocking I/O nonblock ...

  2. Linux系统优化及状态监控

    1.查看系统进程命令 top 进入后可按s 加时间,指定多长时间刷新一次 2.查看cpu信息 cat /proc/cpuinfo 3.查看内存信息 cat /proc/meminfo 4.清理内存:主 ...

  3. Mathcad操作tips:算式输入、变量定义与计算

    算式输入 1. 数字与符号相乘,输入时不必手动输入乘号(“*”). 2. 以下有助于算式的可视化:a. 使用Math工具栏输入,并合理使用tab键:b. 合理使用空格键. 3. 输入开根号时,可用快捷 ...

  4. 基于 ZKEACMS 的云建站 / 自助建站解决方案

    基于ZKEACMS的云建站 / 自助建站解决方案,一站式托管,解决企业建站需求,功能强大,高度自定义.用户只需在界面上输入一些基本信息,选择相应的主题 / 网站模板,然后就可以快速创建一个独一无二的网 ...

  5. owin Oauth

    原文:http://www.cnblogs.com/richieyang/p/4918819.html 一.什么是OAuth OAuth是一个关于授权(Authorization)的开放网络标准,目前 ...

  6. Python短路原则

    1.括号内逻辑先执行 2.and优先级大于or 3.and一假为假 4.or一真为真 and:如果左边为假,返回左边值.如果左边不为假,返回右边值. or:如果左边为真,返回左边值.如果左边不为真,返 ...

  7. Eclipse无法正常创建android工程解决方法!

    我最近升级了安卓的SDK,升级后发现无法在Eclipse中创建android工程了,创建的工程完毕后,没有自动生成这个工程的activity和对应的布局文件,上网搜索一番,最后终于解决了.可能是升级后 ...

  8. HTTP请求的两种方式get和post的区别

    1,get从服务器获取数据:post向服务器发送数据: 2,安全性,get请求的数据会显示在地址栏中,post请求的数据放在http协议的消息体: 3,从提交数据的大小看,http协议本身没有限制数据 ...

  9. badboy使用手册

    使用badboy录制脚本 3.1: 页面功能分析: 1. 界面视图,模拟浏览器,能够进行操作 2. 需要录制脚本的URL 3. 点击运行URL 4. Summary:运行的各指标,响应时间,成功事物等 ...

  10. MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled

    初试redis,删除或者修改值的时候报的错,解决方式是运行命令: 127.0.0.1:6379> config set stop-writes-on-bgsave-error no