Skip to content
Snippets Groups Projects

Draft: Dělená kola

Closed Jiří Setnička requested to merge jirka/delena-kola into devel
3 files
+ 29
10
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 5
4
@@ -90,6 +90,7 @@ CREATE TYPE score_mode AS ENUM (
CREATE TABLE rounds (
round_id serial PRIMARY KEY,
master_round_id int DEFAULT NULL REFERENCES rounds(round_id),
year int NOT NULL, -- ročník MO
category varchar(2) NOT NULL, -- "A", "Z5" apod.
seq int NOT NULL, -- 1=domácí kolo atd.
@@ -104,14 +105,14 @@ CREATE TABLE rounds (
score_mode score_mode NOT NULL DEFAULT 'basic', -- mód výsledkovky
score_winner_limit int DEFAULT NULL, -- bodový limit na označení za vítěze
score_successful_limit int DEFAULT NULL, -- bodový limit na označení za úspěšného řešitele
UNIQUE (year, category, seq)
);
-- Soutěže (instance kola v konkrétním místě)
CREATE TABLE contests (
contest_id serial PRIMARY KEY,
round_id int NOT NULL REFERENCES rounds(round_id),
place_id int NOT NULL REFERENCES places(place_id),
contest_id serial PRIMARY KEY,
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),
UNIQUE (round_id, place_id)
);
Loading