Database Change Management has been one of the practices which I have not seen much in action but there is a first time for everything. When I started a new project time ago, I was aware of lack of this practice and the risks around. In order to avoid risks in the database and wasting time between team members with backups and restores, I started with the research. During the research, I met Flyway
and Liquibase
. Both are powerful but liquibase
was chosen because meet the needs. You can read my post about Database Change Management and Database Change Management with Liquibase.
Currently, Flyway
and Liquibase
are supported by spring-boot
. Both help to manage the scripts execution over the database and you can configure using flyway.*
and liquibase.*
property namespaces. Since version 1.3.0, endpoints for both technologies has been added, their purpose is display data in schema_version
, databasechangelog
or any table you have customized. Previous to this change, credentials are required to access to the database in order to know this status. Now, everything is exposed via spring-boot
and can be accessed to this information through the following endpoints /flyway
, /liquibase
.
These new endpoints have arrived thanks to actuator
which provide several useful endpoints in spring-boot
.
If you are currently using one of these technologies integrated with spring-boot
you just need to add the actuator in your dependencies and voilá you can see through the inside.
For maven users:
1 2 3 4 |
|
For gradle users:
1
|
|
/flyway endpoint
Once you have everything configure, point to the endpoint. E.g: http://localhost:8080/flyway
1 2 3 4 5 6 7 8 9 10 11 12 |
|
/liquibase endpoint
Once you have everything configure, point to the endpoint. E.g: http://localhost:8080/liquibase
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|