NDOJ/judge/migrations/0090_fix_contest_visibility.py

23 lines
579 B
Python
Raw Normal View History

2020-01-21 06:35:58 +00:00
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
2022-05-14 17:57:27 +00:00
("judge", "0089_submission_to_contest"),
2020-01-21 06:35:58 +00:00
]
operations = [
2022-05-14 17:57:27 +00:00
migrations.RunSQL(
"""
2020-01-21 06:35:58 +00:00
UPDATE `judge_contest`
SET `judge_contest`.`is_private` = 0, `judge_contest`.`is_organization_private` = 1
WHERE `judge_contest`.`is_private` = 1
2022-05-14 17:57:27 +00:00
""",
"""
2020-01-21 06:35:58 +00:00
UPDATE `judge_contest`
SET `judge_contest`.`is_private` = `judge_contest`.`is_organization_private`
2022-05-14 17:57:27 +00:00
""",
),
2020-01-21 06:35:58 +00:00
]