Skip to content

Commit b7dcbcd

Browse files
committed
fix: bump cache schema version to force Parquet rebuild after migration
Existing v2 caches may have been built before the schema migration added phone_number to the participants table, resulting in Parquet files without the column. Bumping to v3 ensures build-cache detects the mismatch and triggers a full rebuild automatically.
1 parent d56499e commit b7dcbcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/msgvault/cmd/build_cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var buildCacheMu sync.Mutex
3131
// columns are added/removed/renamed in the COPY queries below so that
3232
// incremental builds automatically trigger a full rebuild instead of
3333
// producing Parquet files with mismatched schemas.
34-
const cacheSchemaVersion = 2 // v2: added sender_id, message_type, attachment_count, phone_number, title
34+
const cacheSchemaVersion = 3 // v3: schema migration adds phone_number etc. to existing DBs; force Parquet rebuild
3535

3636
// syncState tracks the last exported message ID for incremental updates.
3737
type syncState struct {

0 commit comments

Comments
 (0)