WilsonPharma/Practitioners-Workload-DB
1
1"""Compact the WAL into the main DB and VACUUM to reclaim space."""2import sqlite33 4DB = r"w:\01-03-2026\Dr. Heba\Practitioners Workload DB\PractitionersWorkloadDB.db"5conn = sqlite3.connect(DB)6print("Running WAL checkpoint (TRUNCATE)...")7conn.execute("PRAGMA wal_checkpoint(TRUNCATE)")8print("Running VACUUM...")9conn.execute("VACUUM")10conn.close()11print("Done. WAL compacted.")12 