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

Remove people table completely? ✂️ #118

Closed
nelsonic opened this issue Aug 5, 2022 · 6 comments
Closed

Remove people table completely? ✂️ #118

nelsonic opened this issue Aug 5, 2022 · 6 comments
Assignees
Labels
discuss Share your constructive thoughts on how to make progress with this issue good first issue Good for newcomers help wanted If you can help make progress with this issue, please comment! priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished question A question needs to be answered before progress can be made on this issue starter A beginner-friendly issue that is a good starting point for a new person technical A technical issue that requires understanding of the code, infrastructure or dependencies user-feedback Feedback from people using the App

Comments

@nelsonic
Copy link
Member

nelsonic commented Aug 5, 2022

@SimonLab made a very valid/insightful point in #115 (comment) ... 💭
At present the people table is simply mirroring the contents of people from auth
via the JWT when the person successfully authenticates ...
i.e. we are storing the data in the MVP App and don't actually need to.

Two Questions:

1. Will it be confusing to a complete beginner to
not have the people table in the MVP?

At present we have the following ERD as part of the update: #89 (comment)
erd-with-people

To me this makes it reasonably clear what the link between the tables is.
But if we were to remove people, would it still be clear that an item "belongs" to a person?

Removing the people table will not alter the functionality of the MVP ... 📱 📝 ⏳ ✅
But it will result in less code & tests. 🎉
So I'm very much considering it. 💭

2. Will we have a people table in the "real" App?

Once we have finished testing the MVP and we port the code over to the "real" App,
do we want to have a people table? or can we exclude it completely and have a separation of concerns?
i.e. only have the items.person_id reference and store all personal data encrypted in the auth App?

@nelsonic nelsonic added help wanted If you can help make progress with this issue, please comment! good first issue Good for newcomers question A question needs to be answered before progress can be made on this issue technical A technical issue that requires understanding of the code, infrastructure or dependencies priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished user-feedback Feedback from people using the App starter A beginner-friendly issue that is a good starting point for a new person discuss Share your constructive thoughts on how to make progress with this issue labels Aug 5, 2022
@nelsonic
Copy link
Member Author

nelsonic commented Aug 5, 2022

Given that the goal of this repo/project is the minimum code, I'm leaning toward removing the table/schema. 💭

@SimonLab
Copy link
Member

SimonLab commented Aug 5, 2022

My preference would also be to remove the people table for now. Like you said, less code is good!
I don't think it would be to time consuming to add back a table if we need it later on, at the moment auth provides all the info necessary for the MVP to work.

@nelsonic
Copy link
Member Author

nelsonic commented Aug 5, 2022

@SimonLab thank you for suggesting the removal. 👌
I'm happy to get it done now as part of my README.md update ... 👨‍💻
The good news is we can just delete it from the Fly App without any consequences. (once the foreign keys are removed)
But I totally agree I think the MVP will be substantially simplified by removing it!

@nelsonic nelsonic self-assigned this Aug 5, 2022
@nelsonic
Copy link
Member Author

nelsonic commented Aug 5, 2022

Successfully removes people schema/table from the project: 316929c ✂️

New ERD:

image

It's almost comically simple compared to the previous version of the MVP: #89 (comment)

image

Everything still works as expected. 📝 ⏳ ✅
Thanks again for the suggestion. 👌

@nelsonic nelsonic closed this as completed Aug 5, 2022
@SimonLab
Copy link
Member

SimonLab commented Aug 5, 2022

I haven't looked in details at the commit to remove the people table yet, but I'm thinking that if the person_id defined on the items can be null, I think we can also remove the seeds data used to describe guest users: If the person_id is not null is is linked to a loggedin user, otherwise if null it is a public item and created linked to "guest".

Just saw you already removed the seeds: https://github.com/dwyl/app-mvp/blob/phoenix-1.6-2022-refresh-issue-%2389/priv/repo/seeds.exs 👍

@nelsonic
Copy link
Member Author

Having to remove people table again is a huuuuge waste of time.
This decision was made. We didn't need to re-add this table. 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Share your constructive thoughts on how to make progress with this issue good first issue Good for newcomers help wanted If you can help make progress with this issue, please comment! priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished question A question needs to be answered before progress can be made on this issue starter A beginner-friendly issue that is a good starting point for a new person technical A technical issue that requires understanding of the code, infrastructure or dependencies user-feedback Feedback from people using the App
Projects
None yet
Development

No branches or pull requests

2 participants