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

https://github.com/ryanpadilha/rlabs-flyway-spring-boot

Flyway database migrations using Spring Boot
https://github.com/ryanpadilha/rlabs-flyway-spring-boot

database flyway java-8 maven migrations spring spring-boot

Last synced: 3 months ago
JSON representation

Flyway database migrations using Spring Boot

Awesome Lists containing this project

README

          

# rlabs-flyway-spring-boot

##### Version 0.0.1

Flyway with Spring Boot Application 2.0.

This is an example how to work with database migrations with [Flyway](https://flywaydb.org/) and [Spring Boot](https://projects.spring.io/spring-boot/).

It's based on PostgreSQL database-server, then you should check if the server is up and running.

By the way, the Flyway doesn't create the database, its need to be created outside, as well as setting the username and password for the owner of the data resource. In the future, you can easily switch this example to make use of another database by setting up the correct JDBC driver and Connection URL.

## Execution

For execute, simple follow the statement:

$ mvn clean compile flyway:migrate

$ mvn clean compile flyway:info



More details can be found on [Flyway Documentation](https://flywaydb.org/documentation/).

Spring Boot Flyway database migrations on startup details can be found on [here](https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html#howto-execute-flyway-database-migrations-on-startup).

## Requirements

- Java 1.8 or later.
- PostgreSQL Server 9.x or later.
- Maven 3.x or later.

## License

This project is developed for education and PoC goals.

Copyright 2017 © ResearchLabs under [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0)

```
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```