This PR adds a way to decouple the persistence from the domain Aggregate::Event types.
This removes the need to Aggregate::Event to implement the Event trait to work with PgStore.
It simultaneously provides a way to deprecate events without the effects propagating through a code base. Furthermore it provides an alternative way to upcast events.
I have added an example to demonstrate the use case of deprecation and upcasting.
This PR adds a way to decouple the persistence from the domain Aggregate::Event types.
This removes the need to Aggregate::Event to implement the Event trait to work with PgStore.
It simultaneously provides a way to deprecate events without the effects propagating through a code base. Furthermore it provides an alternative way to upcast events.
I have added an example to demonstrate the use case of deprecation and upcasting.