Patching database when using Axon Framework

I am new to the Axon Framework and the event driven database model. So when the business ask me to run a bit of SQL to just put a patch in the database, you’d think it would be an easy thing to do. However, I am now learning that this is a dangerous thing to do, as the event store knows nothing about these changes, so any replay will just remove them.

So in a live environment what are the options for applying a simple patch to database records? I can see that this could be done in code that generated events, that then updated the database, but that requires a code deployment into a secure production environment.

I would be interested in hearing the solutions that people use to this issue.




I’m assuming that the patch is used to fix an issue with one of the views in your database. If so, then I also assume that the event handlers responsible for creating these views have meanwhile been fixed and the version in production has been updated.

If all those assumptions hold there is no reason why a replay of events would simply overwrite the effects of your patch.

However, if you’re somehow not able to update your production environment then that is the real issue and a pretty untenable situation imo. Especially given that database patches apparently are not a problem!