Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/1000kit/tkit-liquibase-plugin
1000kit Liquibase maven plugin to generate database changes
https://github.com/1000kit/tkit-liquibase-plugin
liquibase maven-plugin postgresql
Last synced: about 2 months ago
JSON representation
1000kit Liquibase maven plugin to generate database changes
- Host: GitHub
- URL: https://github.com/1000kit/tkit-liquibase-plugin
- Owner: 1000kit
- License: apache-2.0
- Created: 2022-08-08T07:37:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-06T10:33:37.000Z (about 2 months ago)
- Last Synced: 2024-11-06T11:29:41.193Z (about 2 months ago)
- Topics: liquibase, maven-plugin, postgresql
- Language: Java
- Homepage: https://github.com/1000kit/tkit-liquibase-plugin
- Size: 148 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tkit-liquibase-plugin
1000kit liquibase maven plugin to generate the `DIFF` of the postgresql database.
[![License](https://img.shields.io/badge/license-Apache--2.0-green?style=for-the-badge&logo=apache)](https://www.apache.org/licenses/LICENSE-2.0)
[![Maven Central](https://img.shields.io/maven-central/v/org.tkit.maven/tkit-liquibase-plugin?logo=java&style=for-the-badge)](https://maven-badges.herokuapp.com/maven-central/org.tkit.maven/tkit-liquibase-plugin)
[![GitHub Actions Status](https://img.shields.io/github/actions/workflow/status/1000kit/tkit-liquibase-plugin/build.yml?logo=GitHub&style=for-the-badge)](https://github.com/1000kit/tkit-liquibase-plugin/actions/workflows/build.yml)The plugin will execute this steps:
1. Start docker two postgresql container.
2. Start the `Hibernate` entity manager with `create-drop` flag. This will apply all the `Hibernate` changes to the `target` database.
3. Apply existing Liquibase changes to the `source` database. If there is not `changeLog` file in the `src/main/resource/db` directory the update will be not execute.
4. Compare the `source` and `target` database. The result of the execution will be in the `target/liquibase-diff-changeLog.xml` file.### Maven configuration
### Generate database diff
Create a profile in your maven project.
```xml
db-diff
org.tkit.maven
tkit-liquibase-plugin
latest-version
default
diff
compile
```
Run maven command in the project directory:
```shell script
mvn clean compile -Pdb-diff
```
The result of the execution will be in the `target/liquibase-diff-changeLog.xml` file.### Check liquibase changes
Create a profile in your maven project.
```xml
db-check
org.tkit.maven
tkit-liquibase-plugin
latest-version
default
check
validate
table1,table2
newTable
```
After you run `db-diff` run maven command in the project directory:
```shell script
mvn clean compile -Pdb-diff
mvn clean compile -Pdb-check
```
Check command will validate `target/liquibase-diff-changeLog.xml` file.