Skip to content

Commit f25f778

Browse files
authored
VACUUM command for complete cleaning of local db after logout (#308)
Update the logout command to fully remove the data from the database. DROP only allow the space to be claimed while VACUUM will rebuilds the database file, removing any dropped data.
2 parents 8a2613f + 6ef6b08 commit f25f778

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/modules/database/reset.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const reset = (params: ResetDB) => {
1414
db.prepare('DROP TABLE IF EXISTS syncUpdates').run();
1515
db.prepare('DROP TABLE IF EXISTS transactions').run();
1616
db.prepare('DROP TABLE IF EXISTS device').run();
17+
db.prepare('VACUUM').run();
1718

1819
logger.debug('Database reset');
1920

0 commit comments

Comments
 (0)