Skip to content

Commit 9507cfe

Browse files
branchseerclaude
andcommitted
refactor(cache): bump schema version to 12
`CacheEntryKey` now carries `output_config` and `CacheEntryValue` now carries `output_archive`, so the serialized blob layout changed. Bump `PRAGMA user_version` to 12 and extend the reset range to include 11 so existing databases are wiped cleanly on upgrade instead of failing deserialization mid-lookup. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1efa98a commit 9507cfe

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • crates/vite_task/src/session/cache

crates/vite_task/src/session/cache/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,16 +215,16 @@ impl ExecutionCache {
215215
"CREATE TABLE task_fingerprints (key BLOB PRIMARY KEY, value BLOB);",
216216
(),
217217
)?;
218-
conn.execute("PRAGMA user_version = 11", ())?;
218+
conn.execute("PRAGMA user_version = 12", ())?;
219219
}
220-
1..=10 => {
220+
1..=11 => {
221221
// old internal db version. reset
222222
conn.set_db_config(DbConfig::SQLITE_DBCONFIG_RESET_DATABASE, true)?;
223223
conn.execute("VACUUM", ())?;
224224
conn.set_db_config(DbConfig::SQLITE_DBCONFIG_RESET_DATABASE, false)?;
225225
}
226-
11 => break, // current version
227-
12.. => {
226+
12 => break, // current version
227+
13.. => {
228228
return Err(anyhow::anyhow!("Unrecognized database version: {user_version}"));
229229
}
230230
}

0 commit comments

Comments
 (0)