From 3b37f3630c1be19beeebbc85292692f1ca0c1a17 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Mon, 24 Nov 2025 13:21:14 +0100 Subject: [PATCH] add vacuum statement to migration - reduces DB size after job table migration --- .../repository/migrations/sqlite3/09_add-job-cache.up.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/repository/migrations/sqlite3/09_add-job-cache.up.sql b/internal/repository/migrations/sqlite3/09_add-job-cache.up.sql index d716c40..82e8d15 100644 --- a/internal/repository/migrations/sqlite3/09_add-job-cache.up.sql +++ b/internal/repository/migrations/sqlite3/09_add-job-cache.up.sql @@ -224,4 +224,7 @@ CREATE INDEX IF NOT EXISTS jobs_numacc_starttime ON job (num_acc, start_time); CREATE INDEX IF NOT EXISTS jobs_energy_starttime ON job (energy, start_time); -- Optimize DB index usage -PRAGMA optimize; \ No newline at end of file +PRAGMA optimize; + +-- Optimize DB size: https://sqlite.org/lang_vacuum.html +VACUUM; \ No newline at end of file