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

Update entry_id to use CID instead of UUID #32

Closed
RobStallion opened this issue Jan 28, 2019 · 4 comments
Closed

Update entry_id to use CID instead of UUID #32

RobStallion opened this issue Jan 28, 2019 · 4 comments
Assignees

Comments

@RobStallion
Copy link
Member

Relates to #15, dwyl/cid#1, dwyl/auth#25 & dwyl/cid#11

Replace/update alog so that it creates CIDs based on the content passed to it instead of creating UUIDs.

Will be using this branch to test this for now. This can be updated later once we have a our CID module working as we would like. For now just wanted to get a better understanding of how this functionality will work in alog.

The way alog currently inserted into a database will need to be updated to look something like this...

inserted cid(PK)1 name address prev
1541609554 gVSTedHFGBetxy Bruce Wane 1007 Mountain Drive, Gotham null
1541618643 smnELuCmEaX42 Bruce Wane Rua Goncalo Afonso, Vila Madalena, Sao Paulo, 05436-100, Brazil gVSTedHFGBetxy

See the faqs section of the CID readme for more info on this point.

@RobStallion
Copy link
Member Author

RobStallion commented Jan 28, 2019

Code that will need to change

  • line 82 - replace :entry_id with cid. Also update relevant documentation.
  • insert_entry_id/1 in insert needs to be replaced with DwylCid.cid/1 (the current function I'm using to create CIDs. Will likely change)

insert looks like we would have to remove the insert_entry_id/1 function (this function can probably be removed from the app completely as well no longer be used)

@nelsonic
Copy link
Member

@RobStallion thank you for opening this issue. ✨
Please focus on the open pull requests in CID before doing any work on alog.
image

We need to re-think how alog works and unless you have a decent amount of experience with both existing CMS and Ecto internals you won't accidentally stumble upon the optimal solution to this problem.

@Danwhy Danwhy mentioned this issue Feb 1, 2019
@RobStallion
Copy link
Member Author

Closing this issue in favour of
dwyl/phoenix-ecto-append-only-log-example#23
and
dwyl/phoenix-ecto-append-only-log-example#22

@nelsonic
Copy link
Member

nelsonic commented Feb 6, 2019

@RobStallion thanks for consolidating the issue into the example first. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants