settings: add coefficient to hint and wchoices

This commit is contained in:
nemunaire 2019-01-17 12:03:18 +01:00
commit c5f8288f39
10 changed files with 43 additions and 13 deletions

View file

@ -314,6 +314,7 @@ CREATE TABLE IF NOT EXISTS team_hints(
id_team INTEGER,
id_hint INTEGER,
time TIMESTAMP NOT NULL,
coefficient FLOAT NOT NULL DEFAULT 1.0,
CONSTRAINT uc_displayed UNIQUE (id_team,id_hint),
FOREIGN KEY(id_hint) REFERENCES exercice_hints(id_hint),
FOREIGN KEY(id_team) REFERENCES teams(id_team)
@ -326,6 +327,7 @@ CREATE TABLE IF NOT EXISTS team_wchoices(
id_team INTEGER,
id_flag INTEGER,
time TIMESTAMP NOT NULL,
coefficient FLOAT NOT NULL DEFAULT 1.0,
CONSTRAINT uc_displayed UNIQUE (id_team,id_flag),
FOREIGN KEY(id_flag) REFERENCES exercice_flags(id_flag),
FOREIGN KEY(id_team) REFERENCES teams(id_team)