In that case, your update filters on the user_id.
Re:User-defined Order in SQL (2018)
by sam_lowry_ on Friday August 16, 2024 @06:03AM
(#41264903)
In my real-life case, these were not todos, but cases reviewed by public agents.
These rotate between different agents and supervisors. The ownership is just an attribute intended for humans.
OTOH, rebalancing the order at night is not a problem.
Imagine a situation when multiple clients keep copies of todos and rely on optimistic locking for updates.
This is a cool little problem brilliantly solved.