From c907a6d57fa6577d5bc6b403f5ffdd67244a4fca Mon Sep 17 00:00:00 2001 From: pedrocarlo Date: Sat, 6 Dec 2025 17:23:57 -0300 Subject: [PATCH] automatically convert Legacy sqlite db to WAL mode --- core/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/lib.rs b/core/lib.rs index be561ca3d..b2c5d56d2 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -631,7 +631,9 @@ impl Database { // Now check the Header Version to see which mode the DB file really is on match read_version { Version::Legacy => { - return Err(LimboError::InvalidArgument(format!("Database is in Legacy mode. Use `pragma journal_mode = 'wal'` in sqlite to enable wal mode"))); + // just treat it as WAL mode + header_mut.read_version = RawVersion::from(Version::Wal); + header_mut.write_version = RawVersion::from(Version::Wal); } Version::Wal => { if self.mvcc_enabled() {