https://github.com/devdevx/springboot-flyway
https://github.com/devdevx/springboot-flyway
boilerplate flyway java springboot2
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/devdevx/springboot-flyway
- Owner: devdevx
- Created: 2018-07-15T21:11:41.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-04T17:09:03.000Z (over 7 years ago)
- Last Synced: 2025-04-06T17:17:45.312Z (about 1 year ago)
- Topics: boilerplate, flyway, java, springboot2
- Language: Java
- Size: 47.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction
Flyway allows us to manage all database migrations in a easy and automatic mode.
# Configuration
## Add the maven dependency
```
org.flywaydb
flyway-core
```
## Configure the properties
```
spring.flyway.out-of-order=true
```
By enabling this feature you now can fill all gaps in the migration sequence. This is really helpful for dealing with migration scripts that are in different branches.
## Define the sql version scripts
The slq scripts are located in the `resources/db/migration` folder.
By default, the name should follow the pattern `V__.sql`
# Try it
You can run the project, go to `localhost:8080/h2-console` and log in with the default credentials (simply click 'Connect').
The table `flyway_schema_history` contains all the info related to the migration scripts.
The `ddl-auto` property is configured in validation mode to ensure that the database schema is correct.