79517840

Date: 2025-03-18 14:51:03
Score: 1.5
Natty:
Report link

You have a big problem. Order need UNIQUE constraint. For move a item you need:

1. Removes the UNIQUE constraint.
2. Moves the item.
3. Reactivates the UNIQUE constraint.

Other another way is use strings ("a", "b", "c", etc..), or integer * 100 list (100, 200, 300, etc...). But this way is most simple moves, but add complexity in reorder and automatize when you have a 100, 101 and 102 itens.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Carvalho Costa