pledge4future/WePledge

Enhance emission entries with id fields

Opened this issue · 2 comments

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

@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...

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!