Browse Source
Fix VACUUM INTO query error handling
pull/6989/head
Aaron Brager
1 month ago
committed by
BlackDex
No known key found for this signature in database
GPG Key ID: 58C80A2AA6C765E1
1 changed files with
1 additions and
0 deletions
-
src/db/mod.rs
|
|
@ -403,6 +403,7 @@ pub fn backup_sqlite() -> Result<String, Error> { |
|
|
diesel::sql_query("VACUUM INTO ?") |
|
|
diesel::sql_query("VACUUM INTO ?") |
|
|
.bind::<diesel::sql_types::Text, _>(&backup_file) |
|
|
.bind::<diesel::sql_types::Text, _>(&backup_file) |
|
|
.execute(&mut conn) |
|
|
.execute(&mut conn) |
|
|
|
|
|
.map(|_| ()) |
|
|
.map_res("VACUUM INTO failed")?; |
|
|
.map_res("VACUUM INTO failed")?; |
|
|
|
|
|
|
|
|
Ok(backup_file) |
|
|
Ok(backup_file) |
|
|
|