more idempotent installs

This commit is contained in:
Aiden McClelland
2021-08-17 12:12:17 -06:00
committed by Aiden McClelland
parent 8b1daabb05
commit 3588d0342e
2 changed files with 11 additions and 11 deletions

View File

@@ -37,7 +37,7 @@ impl Interfaces {
let key = TorSecretKeyV3::generate();
let key_vec = key.as_bytes().to_vec();
sqlx::query!(
"INSERT INTO tor (package, interface, key) VALUES (?, ?, ?)",
"INSERT OR IGNORE INTO tor (package, interface, key) VALUES (?, ?, ?)",
**package_id,
**id,
key_vec,