https://github.com/zebrajaeger/spring-boot-liquibase-diff
spring boot liquibase maven plugin diff
https://github.com/zebrajaeger/spring-boot-liquibase-diff
Last synced: about 2 months ago
JSON representation
spring boot liquibase maven plugin diff
- Host: GitHub
- URL: https://github.com/zebrajaeger/spring-boot-liquibase-diff
- Owner: zebrajaeger
- Created: 2017-11-18T19:59:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-19T09:11:57.000Z (over 7 years ago)
- Last Synced: 2025-02-07T23:42:56.630Z (3 months ago)
- Language: Shell
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Spring Boot Liquibase Diff
==========================This is a simple project as demonstration how to generate liquibase change-logs with
liquibase maven plugin from diff between database and JPA(Hibernate) entities without
writing changelocks manually.Overview
-----------------
The project consists of two components.
* The App itself
* A Tool project that helps us to generate the changelock with the correct spelling for tables and columnsPrepare / Install
-----------------
First step is installing the jar in local maven repo. Call
*mvn clean install*
in <project root>This step is important because the liquibase plugin has a dependency to the Tools
project artefact.Second step is installing ans starting Postgres DB. Use the shell or pgAdmin Tool to create a new
database with the name
*liquibase-test*Optional: Change model
---------------------
Now you can change the JPA model a little bit in
de.zebrajaeger.liquibaseconfigtest.persistence.modelCreate Diff
------------
To create a diff go to
*<project root>/app*
and call
*mvn clean compile liquibase:diff*This compiles the classes inclusive the model classes (important!) and creates the diff.
The result occurs in <project-root>/app/src/main/resources/liquibase-diff-changeLog.xml
Update App
----------
After copying the changes to liquibase-changeLog.xml (and deletion of liquibase-diff-changeLog.xml)
the start of the application class
*de.zebrajaeger.liquibaseconfigtest.LiquibaseConfigTestApplication*
should be fine