Skip to content

Question: Renaming events and identities #862

Answered by hvidgaard
chrisjainsley asked this question in Q&A
Discussion options

You must be logged in to vote

Renaming things in an event sourcing system is generally not something you want to do unless you have to. In this case, renaming events is supported as @rasmus say. But renaming the aggregate is not supported the same way. You could rename the class, with AggregateNameAttribute set to the old name. If that is not good enough, you can use the same mechanic to upgrade all events to new versions that operate on the new aggregate just as I think you already have figured out - it's not a simple thing to do, but certainly possible.

Another way could be directly modify the events in the database, but I'd strongly advice against this unless you have a really good reason.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by rasmus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants
Converted from issue

This discussion was converted from issue #736 on June 11, 2021 12:53.