admin/maintenance: sqlite vacuum

This commit is contained in:
Philippe Loctaux 2023-05-06 16:38:22 +02:00
parent ff6c910b2f
commit 37c5127bbc
6 changed files with 52 additions and 12 deletions

View file

@ -38,6 +38,15 @@ impl Settings {
.map_err(handle_error)
}
pub async fn vacuum(conn: impl SqliteExecutor<'_>) -> Result<(), Error> {
sqlx::query!("vacuum")
.execute(conn)
.await
.map_err(handle_error)?;
Ok(())
}
pub async fn set_business_name(
conn: impl SqliteExecutor<'_>,
value: Option<&str>,