Partial resolution of exercices
This commit is contained in:
parent
98aa051a37
commit
3cd6cd959d
8 changed files with 46 additions and 24 deletions
11
libfic/db.go
11
libfic/db.go
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue