Reputation: 5196
I've been googling for hours but it doesn't seems to exist another way to create liquibase changelog files but by hand.
Isn't there any tools or command lines to automate the creation of changelog files ? I'm using JHipster that is correctly creating changelogs for new entities but as stated here, JHipster won't generate new changelogs for updated entites, so I was wondering if their was any kind of tool to generate additional changelogs? Actually I'm creating changelogs by writing xml files by hand and it doesn't seems super efficient.
Thank you for reading.
Upvotes: 1
Views: 826
Reputation: 3186
You can try to generate a changelog from your JPA entities and then add them to your changelog selectively as described here where you can find an example on how to generate changelogs from jpa entities.
Another technique could be to generate your jpa entities automatically in your database using spring.jpa.hibernate.ddl-auto=update
and then generate your liquibase changelog to export the current database state and then add selectively new entities to your applicaton changelog.
You can also generate liquibase changelog using a database with tables previously created.
liquibase --driver=driver.jdbc.Class \
--classpath=/path/to/drivers/lib/driver.jdbc.jar \
--changeLogFile=liquibase-changelog.xml \
--url="jdbc:url:thin:@192.168.1.100:1525:path" \
--username=USER \
--password=PASS \
--logLevel=debug \
generateChangeLog
Upvotes: 0