Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dreampie/flyway-maven-plugin

flyway maven plugin
https://github.com/dreampie/flyway-maven-plugin

Last synced: 2 months ago
JSON representation

flyway maven plugin

Awesome Lists containing this project

README

        

# flyway-maven-plugin
flyway maven plugin 是基于flyway的的数据库脚本升级插件

## 使用方式
### 1. 在resources下创建application.propeties,存放数据库相关配置
```JAVA
#default表示数据源的名字
db.default.url=jdbc:mysql://127.0.0.1/resty-demo?useUnicode=true&characterEncoding=UTF-8
db.default.user=dev
db.default.password=dev1010

#flyway database migration
#验证失败时自动清理
flyway.default.valid.clean=true
#自动升级,如果false会先检测数据库状态
flyway.default.migration.auto=true
#执行升级时,如果数据库还没有被初始化执行初始化
flyway.default.migration.initOnMigrate=true
```
### 2. 配置Maven插件
```XML

cn.dreampie
flyway-maven-plugin
1.1


${basedir}/src/main/resources/application.properties

filesystem:${basedir}/src/main/resources/db/migration/



mysql
mysql-connector-java
${mysql.version}

```