cms
cms copied to clipboard
Support having 2 tasks on DB with the same Task.name
I remember that this was discussed and @giomasce told me that all cms-dev agreed that it would be a good idea to allow duplicate Task.name
This is painful in situations where you have a "practice session" (e.g. IOI day0) where you may want to put old tasks, which are already on the DB.
The current workaround I'm using is to manually rename the old tasks to "old_
(I don't remember that discussion.)
I expect that, while you want to abolish the uniqueness of Task.name, you want to keep the uniqueness of (Task.contest_id, Task.name). Is that the case? If you did this exact replacement right now in the DB would anything break? If the answer is no then this issue is a no-brainer for me.
I checked old telegram messages and it appears that the discussion was actually on User.username and not on Task.name 😅 and the outcome was that you all wanted to enforce uniqueness of it, not remove it 😓
That sounds more like us, yes :P
Anyway
you want to keep the uniqueness of (Task.contest_id, Task.name). Is that the case? If you did this exact replacement right now in the DB would anything break?
Yes, and I don't know but I don't think so
One thing that would break is RWS, even though it should be quite easy to fix.