I'm doing some logic during the migration that requires running a custom script. To do this I'm using exexuteCommand to run a sh script which then runs my code using node. This works fine except that I can't actually make it so that the migration fails when an error occurs.
I've reduced the problem to the following example.
yaml file configuring the migration step:
databaseChangeLog:
- changeSet:
id: 1637655796
author: [me]
changes:
- executeCommand:
executable: [path to script]
sh file:
node [path to .js file]
js file:
process.exit(1)
also tried:
throw new Error()
The file runs properly but liquibase marks the migration as successfull and updates the DB change log as if everything went as planned. How do I make the migration fail when the script fails?