I currently have four ChangeUnits written as follows:
- id="system-codes-initializer" (runAlways=true)
- id="source-config-initializer" (runAlways=true)
- id="action-box-initializer" (runAlways=false)
- id="button-action-initializer" (runAlways=false)
When I run Mongock for the first time, the mongockChangeLog collection shows four new entries indicating that all four ChangeUnits have been executed. Every subsequent time I run Mongock, I only see two new entries (for action-box-initializer and button-action initializer) that log runAlways=false scripts as "IGNORED".
I expect to see that the two runAlways=True scripts are also logged in mongockChangeLog collection as "EXECUTED" every time Mongock is run, but I do not see this. Is there a configuration option for me to change the logging behavior of runAlways=true ChangeUnits?
Edit: I believe the error is in Mongock's io.mongock.runner.core.executor.ChangeExecutorBase.class file on line 231. According to the code, it looks like the ChangeLog is only logged in the mongockChangeLog collection if it is runAlways=true
that hasn't been executed before, or it is runAlways=false
...
line 231 in question