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

@@ -20,16 +20,6 @@
"nullable": []
}
},
"121a1c1c0c11c5588c17bbd9b2baeca4d27d1a6d82d6487fad142ffb58d1da0c": {
"query": "INSERT INTO tor (package, interface, key) VALUES (?, ?, ?)",
"describe": {
"columns": [],
"parameters": {
"Right": 3
},
"nullable": []
}
},
"3efd0daa61f4f8bead1adbe78a8225bc31fb940406d0415b578d3adc03a5e414": {
"query": "SELECT hash FROM password",
"describe": {
@@ -188,6 +178,16 @@
]
}
},
"d79d608ceb862c15b741a6040044c6dd54a837a3a0c5594d15a6041c7bc68ea8": {
"query": "INSERT OR IGNORE INTO tor (package, interface, key) VALUES (?, ?, ?)",
"describe": {
"columns": [],
"parameters": {
"Right": 3
},
"nullable": []
}
},
"de2a5e90798d606047ab8180c044baac05469c0cdf151316bd58ee8c7196fdef": {
"query": "SELECT * FROM ssh_keys WHERE fingerprint = ?",
"describe": {

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,