Add support for created_at
values to be of type NaiveDateTime.
#175
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NaiveDateTime support was removed in #150. This is fine for new apps and, if running the migration, updating existing apps.
However, one scenario was not thought through and that is one where there are many consumers of the event store.
Say I have my main ES application that is running just fine with
eventstore 0.17
. But my collegue wishes to subscribe to events from a different application. He tries to usev0.17
but it is incompatible withDBConnection 2.0
, so he changes theeventstore
dependency to use the master branch. Because the original application is still usingNaiveDateTime
as the timestamp, the new application crashes withno function clause matching in EventStore.Storage.Reader.EventAdapter.from_timestamp/1
.It is very easy to support both scenarios going forward. And this is my attempt at solving this issue.