checker: deep redesign
This commit is contained in:
parent
4a27c9367e
commit
853477e54a
4 changed files with 132 additions and 38 deletions
|
|
@ -95,6 +95,19 @@ CREATE TABLE IF NOT EXISTS student_challenges(
|
|||
CONSTRAINT token_found UNIQUE (id_student,challenge),
|
||||
FOREIGN KEY(id_student) REFERENCES students(id_student)
|
||||
) DEFAULT CHARACTER SET = utf8 COLLATE = utf8_bin;
|
||||
`); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := db.Exec(`
|
||||
CREATE TABLE IF NOT EXISTS student_challenge_errors(
|
||||
id_st INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||
id_student INTEGER NOT NULL,
|
||||
challenge INTEGER NOT NULL,
|
||||
time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
error VARCHAR(255) NOT NULL,
|
||||
CONSTRAINT token_found UNIQUE (id_student,challenge),
|
||||
FOREIGN KEY(id_student) REFERENCES students(id_student)
|
||||
) DEFAULT CHARACTER SET = utf8 COLLATE = utf8_bin;
|
||||
`); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue