liquibase

How to execute a single DB script multiple times in Liquibase?


I have a DB script (Generic GRANTS script) which should be run after every deployment. I want to run this script in the end every single time once my DB deployment is done. I tried using below code with runOnChnage indicator set to "true" but still no luck.

Please note that since this is a generic script, there is no change happening on this script and it should be run in the end of my deployment. Also, FYI please, I do have entries in the master changelog file to run my "all_time_release_changelog.xml" file

<changeSet context="all_time_release" id="Generic_Grants" author="TestUser" runOnChange="true">
    <sqlFile splitStatements="true" endDelimiter="/" path="src/main/sql/Grants/generic_grants.sql" />
</changeSet>

Am I missing any parameter here? Please help.


Solution

  • Try runAlways instead of runOnChange. This should run your script on each deployment.