Adding new fields to events

Hi All,

Let’s suppose we have an event FileWasCopied and after some time we discovered that there is a sourceFileId field that is missing. We would like to add the “missing” field into the event. sourceFileId is not something that has default value and it’s not something we can calculate. Question is: how do we add new fields to the events, that need values from external sources?
Creating new event doesn’t feel right, because sourceFileId is more of less something we forgot at the beginning. Upcasters seems to be not enought in this case, am I right?


Hi Rafal,

Are you referring to actually modifying the existing events to include the new field (goes a bit against the ‘single source of truth’ principle), or would upcasting suffice (where you handle ‘old’ events that do not yet have the field)? By upcasting you are not necessarily enforced to use a default value, you can compute this value depending on the old events’ other properties, for example.