Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for created_at values to be of type NaiveDateTime. #175

Merged
merged 1 commit into from
Oct 10, 2019

Conversation

trbngr
Copy link
Contributor

@trbngr trbngr commented Oct 9, 2019

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 use v0.17 but it is incompatible with DBConnection 2.0, so he changes the eventstore dependency to use the master branch. Because the original application is still using NaiveDateTime as the timestamp, the new application crashes with no 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.

NaiveDateTime support was removed in commanded#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 use v0.17 but it is incompatible with `DBConnection 2.0`, so he changes the `eventstore` dependency to use the master branch. Because the original application is still using `NaiveDateTime` as the timestamp, the new application crashes with `no 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.
@slashdotdash slashdotdash merged commit 832b368 into commanded:master Oct 10, 2019
@slashdotdash
Copy link
Member

Thanks for the PR Chris.

slashdotdash added a commit that referenced this pull request Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants