I have this UserCreatedEvent
class with revision 1.0
@Revision("1.0")
data class UserCreatedEvent(
val userId: UUID,
val firstname: String,
val lastname: String
)
then later I updated the event by removing lastname
field so it becomes like this
@Revision("1.0")
data class UserCreatedEvent(
val userId: UUID,
val firstname: String,
// val lastname: String removed
)
but I forgot to change the revision number from 1.0 to 2.0 so it still remains 1.0. now my event store contains UserCreatedEvent
with the same revision but different schema. Application still works just fine so I thought it was fine. but when I tried to re-run projection now it gives an error that there’s no lastname field in the UserCreatedEvent
. I tried upcasting from revision 1.0 to 1.0 but it’s not working either. what should I do to solve the problem?