0

I am using postgresql in jhipster microservices application. I am following jhipster documentation as below.

Database updates with the Maven liquibase:diff goal If you have choosen to use MySQL, MariaDB or PostgreSQL in development, you can use the ./mvnw liquibase:diff goal to automatically generate a changelog.

If you are running H2 with disk-based persistence, this workflow is not yet working perfectly, but you can start trying to use it (and send us feedback!).

Liquibase Hibernate is a Maven plugin that is configured in your pom.xml, and is independant from your Spring application.yml file, so if you have changed the default settings (for example, changed the database password), you need to modify both files.

Here is the development workflow:

Modify your JPA entity (add a field, a relationship, etc.) Compile your application (this works on the compiled Java code, so don’t forget to compile!) Run ./mvnw liquibase:diff (or ./mvnw compile liquibase:diff to compile before) A new “change log” is created in your src/main/resources/config/liquibase/changelog directory Review this change log and add it to your src/main/resources/config/liquibase/master.xml file, so it is applied the next time you run your application

after updating an entity and following above document I have added generated changelog file in master.xml file.

<include file="config/liquibase/changelog//20190912080313_changelog.xml" relativeToChangelogFile="false"/>

Still I am getting liquibase checksum validation error while running the application.Below is the screenshot enter image description here

Please help me out with this issue.

Rahul
  • 493
  • 3
  • 7
  • 25
  • It's not complaining about `20190912080313_changelog.xml` but about `20190912070733_added_entity_Blog.xml`. Maybe https://stackoverflow.com/questions/9995747/liquibase-checksum-validation-error-without-any-changes will help! – Jochen Haßfurter Sep 12 '19 at 12:22
  • I have tried all the possible ways mentioned in the official document https://www.jhipster.tech/development/#using-a-database, but still facing checksum validation error – Rahul Sep 12 '19 at 13:32
  • 1
    I don't want to drop my table and regenerate it, I want to update an entity and table should be updated according to that without loosing any data. – Rahul Sep 12 '19 at 13:33
  • Don't know what's different for you, it works for others. Anyway use a db client like DBeaver to connect to your db and try deleting the MD5SUM column for your changelog row in DATABASECHANGELOG table. Look at https://www.liquibase.org/documentation/databasechangelog_table.html – Gaël Marziou Sep 12 '19 at 19:26
  • Also you said you have tried everything but I can't see any error in your question about each method you tried. – Gaël Marziou Sep 12 '19 at 19:31

0 Answers0