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

Enhance emission entries with id fields #329

Open
codingfabi opened this issue Jul 9, 2023 · 2 comments
Open

Enhance emission entries with id fields #329

codingfabi opened this issue Jul 9, 2023 · 2 comments
Assignees
Labels
backend Prio:HIGH Issues that should be solved ASAP

Comments

@codingfabi
Copy link
Contributor

codingfabi commented Jul 9, 2023

All of the emission entries should contain a unique identifier and the id of the user that created the entry. This would enable us to select/delete/edit specific entries.

Is a blocker for #248 and #97

@codingfabi codingfabi self-assigned this Jul 9, 2023
@codingfabi codingfabi added the Prio:HIGH Issues that should be solved ASAP label Jul 9, 2023
@codingfabi
Copy link
Contributor Author

@redfrexx I did not really make progress here because I do not understand how to reset the database schema and how to add a uuid field to the emission entries. Maybe you can show me an example for one of the entry types or smth...

@redfrexx
Copy link
Member

redfrexx commented Aug 6, 2023

Adding an id field should work using the models.UUID() class, e.g. https://github.com/pledge4future/WePledge/blob/dev/backend/src/emissions/models/customUser.py#L14C1-L14C1

After changing the database schema you have to delete all docker containers, images and volumes and delete all files in the migrations folder. Hope this helps, @codingfabi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Prio:HIGH Issues that should be solved ASAP
Projects
None yet
Development

No branches or pull requests

2 participants