bresu / buecherboerse

Bücherbörse für die FV Jus
2 stars 0 forks source link

Make field matriculationNumber optional #10

Closed matteioo closed 8 months ago

matteioo commented 8 months ago

OG: "Make the field matriculationNumber optional, so that sellers without a matriculation number can be created and therefore associated with offers."

Leads to problems with adding sellers that are already in the database. Although this can be caught by the frontend I also want a database constraint.

bresu commented 8 months ago

Proposal: Make combination of email and matriculationNumber unique, so that it's impossible to set the same person twice. Edge case being person with no matriculation Number and providing different email adresses.

matteioo commented 8 months ago

Leads to problems with adding sellers that are already in the database. Although this can be caught by the frontend I also want a database constraint.

Proposal: Make combination of email and matriculationNumber unique, so that it's impossible to set the same person twice. Edge case being person with no matriculation Number and providing different email adresses.

How would this be a problem? Is the email not unique already?

bresu commented 8 months ago

It is, but people give us their univerisity email adresses, private email adresses etc. But if you don't see an issue, we can do this easily

bresu commented 8 months ago

FIXED at commit 8cd5bf4