Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support having 2 tasks on DB with the same Task.name #765

Open
wil93 opened this issue May 18, 2017 · 5 comments · May be fixed by #998
Open

Support having 2 tasks on DB with the same Task.name #765

wil93 opened this issue May 18, 2017 · 5 comments · May be fixed by #998

Comments

@wil93
Copy link
Member

wil93 commented May 18, 2017

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_" and then importing the new ones.

@lw
Copy link
Member

lw commented May 18, 2017

(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.

@wil93
Copy link
Member Author

wil93 commented May 18, 2017

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 😓

@lw
Copy link
Member

lw commented May 18, 2017

That sounds more like us, yes :P

@wil93
Copy link
Member Author

wil93 commented May 18, 2017

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

@lw
Copy link
Member

lw commented May 18, 2017

One thing that would break is RWS, even though it should be quite easy to fix.

@wil93 wil93 linked a pull request Aug 22, 2018 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants