Can share survey results with a secret shared key
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9fd73ce235
commit
fff8b821c5
10 changed files with 367 additions and 7 deletions
11
db.go
11
db.go
|
@ -255,6 +255,17 @@ CREATE TABLE IF NOT EXISTS categories(
|
|||
promo MEDIUMINT NOT NULL,
|
||||
expand BOOLEAN NOT NULL DEFAULT FALSE
|
||||
) DEFAULT CHARACTER SET = utf8 COLLATE = utf8_bin;
|
||||
`); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := db.Exec(`
|
||||
CREATE TABLE IF NOT EXISTS survey_shared(
|
||||
id_share INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||
id_survey INTEGER NOT NULL,
|
||||
secret BLOB NOT NULL,
|
||||
count MEDIUMINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
FOREIGN KEY(id_survey) REFERENCES surveys(id_survey)
|
||||
) DEFAULT CHARACTER SET = utf8 COLLATE = utf8_bin;
|
||||
`); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Reference in a new issue