chore: vacuum DB after deleting records

This commit is contained in:
Richard Ramos 2022-05-05 14:11:23 -04:00
parent 19f13b80fa
commit 30527b9a80
1 changed files with 6 additions and 0 deletions

View File

@ -127,6 +127,12 @@ func (d *DBStore) cleanOlderRecords() error {
} }
} }
// reduce the size of the DB file after the delete operation. See: https://www.sqlite.org/lang_vacuum.html
_, err := d.db.Exec("VACUUM")
if err != nil {
return err
}
return nil return nil
} }