Skip to content

Fix import of old WhatsApp msgstore.db backups#272

Merged
wesm merged 2 commits intomainfrom
fix/old-whatsapp-backup
Apr 15, 2026
Merged

Fix import of old WhatsApp msgstore.db backups#272
wesm merged 2 commits intomainfrom
fix/old-whatsapp-backup

Conversation

@wesm
Copy link
Copy Markdown
Owner

@wesm wesm commented Apr 15, 2026

Summary

  • Detect missing chat.group_type and message_media.media_caption columns in old WhatsApp schemas (pre-2022) via PRAGMA table_info, defaulting to 0/NULL when absent
  • Column cache scoped per (db pointer, table) so multiple databases with different schemas in the same process get independent detection

Fixes #271

wesm and others added 2 commits April 15, 2026 07:17
Old WhatsApp databases (pre-2022) lack `chat.group_type` and
`message_media.media_caption` columns. Detect column presence
via PRAGMA table_info and build queries adaptively, defaulting
to 0/NULL when columns are absent.

Fixes #271

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Key the schema column cache by (db pointer, table) instead of just
table name, so inspecting multiple WhatsApp databases with different
schemas in the same process produces correct results.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@roborev-ci
Copy link
Copy Markdown

roborev-ci bot commented Apr 15, 2026

roborev: Combined Review (aa19ec0)

No Medium, High, or Critical issues found.

All review agents that reported results found the change clean.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@wesm wesm merged commit a865f82 into main Apr 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Old WhatsApp msgstore.db backups unimportable

1 participant