util function to only allow creating one database entry for a given key #3

Open
opened 2024-08-29 01:00:12 +02:00 by Wonder · 1 comment
Collaborator

There are a few things (like memberships) that don't make sense to create more than one instance of for any given user/id pair. While it currently doesn't break anything, it's an invalid state. W& aren't entirely sure how it would work at this time (might make more sense in the future), but leaving this issue here as a note to whoever ends up implementing/needing it.

There are a few things (like memberships) that don't make sense to create more than one instance of for any given user/id pair. While it currently doesn't break anything, it's an invalid state. W& aren't entirely sure how it would work at this time (might make more sense in the future), but leaving this issue here as a note to whoever ends up implementing/needing it.
Author
Collaborator

This is a thing the database can do, apparently. The postgresql documentation should explain atomic operations and how to use unique combined data as a way to make this kind of thing atomic. The server should expect only this particular type of failure and handle it correctly ("You have already claimed this task" or whatever message is relevant).

This is a thing the database can do, apparently. The postgresql documentation should explain atomic operations and how to use unique combined data as a way to make this kind of thing atomic. The server should expect only this particular type of failure and handle it correctly ("You have already claimed this task" or whatever message is relevant).
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
joepie91/planner#3
No description provided.