implementation rollup feature at Flyway
- checkout this repository
exec:java -Dmain.class=com.hachiyae.flyway.FlywayMain -Dexec.args=-h
- Rollup SQL script files in specific directory.
- delete specific record in schme_version tables.
Our team are using Flyway.We create two directies
- stable
- other member(branch) created file.
- development
- working directory in feature branch
-- db --- migrate -+- stable -+- V1.0.1__foo.sql
| +- V1.0.2__bar.sql
|
+- development -+- V2.0.0__foo.sql
+- V2.0.1__bar.sql
We have two issues.
- We must keep a lot of SQL files.(V1.0.1__xxx.sql 〜 V1.0.200__yyy.sql !!!)
- I can't migrate in development directory, after I merge from other branch.
e.g.) - migrate V2.0.1__bar.sql
- merge from other branch, get V1.0.10__create.sql
- migrate, but don't run V1.0.10__create.sql in my enviroment.
This tool resolve above issues.
| option | description |
|---|---|
| -h | database host |
| -P | database port |
| -d | database name |
| -u | database user |
| -p | database password |
| -s | stable script directories |
| -D | development script directories |
| -c | migrate command(flyway default command and rollup, dev_clean) |
| --encode | flyway encode |
| -X | debug |
| -o | rollup file description |
| --help | print usage |
See License