I am newbie in using liquibase for database management. I am getting the following error while doing mvn install. I am not able to know where exactly i went wrong. Could someone please help me with the solution
Caused by: liquibase.exception.ValidationFailedException: Validation Failed:
1 changes have validation failures
'sql' is required, db/changelog/changes/v0001.sql::raw::includeAll
db.changelog-master.yaml
databaseChangeLog:
- includeAll:
path: db/changelog/changes/
liquibase folder structure
In liquibase whenever a migration is run it creates a hash value for each of the change log written in migration file. When the application is run for the first time entry is created for each change log with its hash values in the DatabaseChangelog Table.
You seem to have modified a liquibase changeset that has already been executed by Liquibase. Don't do that: revert to the previous version, and add a new changeset. Then add another changeSet (or task) transforming all the 0 in that column to 'ACTIVE', and all the 1 in that column to 'PASSIVE'.
If a change is made to the existing change log which has been run once the hash value changes and a validation error is generated. To fix this issue you can revert the changes made to the change log after it was run for the first time and create a new change log to accommodate the change
The validate command checks and identifies any possible errors in a changelog that may cause the update command to fail. Use the validate command to detect if there are any issues with a changelog before running the update command.
In liquibase whenever a migration is run it creates a hash value for each of the change log written in migration file. When the application is run for the first time entry is created for each change log with its hash values in the DatabaseChangelog Table.If a change is made to the existing change log which has been run once the hash value changes and a validation error is generated.
To fix this issue
you can revert the changes made to the change log after it was run for the first time and create a new change log to accommodate the change
OR
delete the entries in the DatabaseChangeLog table for the particular change log giving error along with the change associated with the change log and rerun your migration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With