Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
95e8f42b
Commit
95e8f42b
authored
4 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
DB: Delegace stavu kola na soutěže
parent
8db2d62c
No related branches found
No related tags found
1 merge request
!49
Stavy soutěže
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
db/db.ddl
+3
-1
3 additions, 1 deletion
db/db.ddl
db/upgrade-20210308.sql
+6
-0
6 additions, 0 deletions
db/upgrade-20210308.sql
with
9 additions
and
1 deletion
db/db.ddl
+
3
−
1
View file @
95e8f42b
...
...
@@ -77,10 +77,11 @@ CREATE TYPE round_state AS ENUM (
'preparing', -- v přípravě (viditelné pouze organizátorům)
'running', -- je možno odevzdávat
'grading', -- je možno opravovat a vyplňovat body
'closed' -- uzavřeno, není dovoleno nic měnit, zveřejněny výsledky
'closed'
,
-- uzavřeno, není dovoleno nic měnit, zveřejněny výsledky
-- Garanta stavy neomezují, vždycky může všechno.
-- Ve stavu "running" mohou odevzdávat účastníci i dozor, a to i po termínu,
-- jen se odevzdaná řešení zobrazují jako opožděná.
'delegate' -- každá soutěž má svůj stav
);
CREATE TYPE score_mode AS ENUM (
...
...
@@ -117,6 +118,7 @@ CREATE TABLE contests (
master_contest_id int DEFAULT NULL REFERENCES contests(contest_id),
round_id int NOT NULL REFERENCES rounds(round_id),
place_id int NOT NULL REFERENCES places(place_id),
state round_state NOT NULL DEFAULT 'preparing', -- používá se, pokud round.state='delegate', jinak kopíruje round.state
UNIQUE (round_id, place_id)
);
...
...
This diff is collapsed.
Click to expand it.
db/upgrade-20210308.sql
0 → 100644
+
6
−
0
View file @
95e8f42b
SET
ROLE
'mo_osmo'
;
ALTER
TYPE
round_state
ADD
VALUE
'delegate'
;
ALTER
TABLE
contests
ADD
COLUMN
state
round_state
NOT
NULL
DEFAULT
'preparing'
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment