QA: add a list of team's exercices

This commit is contained in:
nemunaire 2020-11-13 13:11:58 +01:00
commit ea334a8a2f
5 changed files with 154 additions and 23 deletions

View file

@ -457,6 +457,17 @@ CREATE TABLE IF NOT EXISTS teams_qa_todo(
FOREIGN KEY(id_exercice) REFERENCES exercices(id_exercice),
FOREIGN KEY(id_team) REFERENCES teams(id_team)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
`); err != nil {
return err
}
if _, err := db.Exec(`
CREATE TABLE IF NOT EXISTS teams_qa_view(
id_view INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
id_team INTEGER NOT NULL,
id_exercice INTEGER NOT NULL,
FOREIGN KEY(id_exercice) REFERENCES exercices(id_exercice),
FOREIGN KEY(id_team) REFERENCES teams(id_team)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
`); err != nil {
return err
}