Partial resolution of exercices

This commit is contained in:
nemunaire 2016-12-04 19:08:46 +01:00
commit 3cd6cd959d
8 changed files with 46 additions and 24 deletions

View file

@ -107,6 +107,17 @@ CREATE TABLE IF NOT EXISTS exercice_keys(
value BINARY(64) NOT NULL,
FOREIGN KEY(id_exercice) REFERENCES exercices(id_exercice)
);
`); err != nil {
return err
}
if _, err := db.Exec(`
CREATE TABLE IF NOT EXISTS key_found(
id_key INTEGER NOT NULL,
id_team INTEGER NOT NULL,
time TIMESTAMP NOT NULL,
FOREIGN KEY(id_key) REFERENCES exercice_keys(id_key),
FOREIGN KEY(id_team) REFERENCES teams(id_team)
);
`); err != nil {
return err
}