fix(CapacitorPlatformService): ensure connection opened before PRAGMAs (v3.3.4)

- Fix fallback PRAGMA method to open newly created connections immediately
- Prevents 'database not opened' errors when applying PRAGMAs
- Newly created connections are now opened before PRAGMA application
- Adds explicit logging for connection opening in fallback path
- Ensures journal_mode is correctly set to WAL instead of unknown

This fixes the issue where PRAGMAs were being applied on connections
that weren't yet opened, causing initialization failures. The fix ensures
that after creating a connection in the fallback path, it is immediately
opened before attempting to apply PRAGMAs.

Tested: Connection opens successfully, PRAGMAs apply correctly,
journal_mode set to WAL, initialization completes in ~38ms.
This commit is contained in:
Matthew Raymer
2025-11-07 10:32:28 +00:00
parent 239666e137
commit 59434ff5f7

File diff suppressed because it is too large Load Diff