sync: add dependency on flag to download file
This commit is contained in:
parent
dcfb34c6fd
commit
1e2a74f3ca
9 changed files with 112 additions and 16 deletions
10
libfic/db.go
10
libfic/db.go
|
@ -163,6 +163,16 @@ CREATE TABLE IF NOT EXISTS exercice_keys(
|
|||
cksum BINARY(64) NOT NULL,
|
||||
FOREIGN KEY(id_exercice) REFERENCES exercices(id_exercice)
|
||||
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
|
||||
`); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := db.Exec(`
|
||||
CREATE TABLE IF NOT EXISTS exercice_files_deps(
|
||||
id_file INTEGER NOT NULL,
|
||||
id_key INTEGER NOT NULL,
|
||||
FOREIGN KEY(id_file) REFERENCES exercice_files(id_file),
|
||||
FOREIGN KEY(id_key) REFERENCES exercice_keys(id_key)
|
||||
) DEFAULT CHARACTER SET = utf8 COLLATE = utf8_bin;
|
||||
`); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Reference in a new issue