Skip to content

fix(plugins): register all SQLite file extensions end-to-end (#1327)#1331

Merged
datlechin merged 2 commits into
mainfrom
fix/1327-register-db-as-sqlite
May 19, 2026
Merged

fix(plugins): register all SQLite file extensions end-to-end (#1327)#1331
datlechin merged 2 commits into
mainfrom
fix/1327-register-db-as-sqlite

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

Closes #1327 (.db not registered as SQLite document type — Finder "Open With" grays out TablePro).

The reported gap was .db, but auditing the codebase surfaced the opposite-direction gap as well: TablePro's Info.plist and the SQLite plugin had different SQLite extension lists, and neither was a superset of the other.

Source Before
Info.plist (CFBundleDocumentTypes + UTExportedTypeDeclarations) sqlite, sqlite3, db3, s3db, sl3, sqlitedb
SQLitePlugin.swift + PluginMetadataRegistry db, sqlite, sqlite3

Two real bugs from this mismatch:

  1. .db files missing from Info.plist → Finder "Open With" grays out TablePro (the reported issue).
  2. .db3 / .s3db / .sl3 / .sqlitedb files claimed by Info.plist but not registered in the plugin's extension mapURLClassifier.swift:37 returns nil from classifyFile(...), so double-clicking these files in Finder launches TablePro but silently fails to open them. This was a latent bug nobody had reported yet.

Fix: pick the union in all four locations: db, db3, s3db, sl3, sqlite, sqlite3, sqlitedb. Plus mobile parity.

Files changed

  • TablePro/Info.plist — added db to CFBundleDocumentTypes and UTExportedTypeDeclarations (the second one is what tells Launch Services TablePro can handle the type)
  • Plugins/SQLiteDriverPlugin/SQLitePlugin.swift — extension list now ["db", "db3", "s3db", "sl3", "sqlite", "sqlite3", "sqlitedb"]
  • TablePro/Core/Plugins/PluginMetadataRegistry.swift — same list, the registry's runtime map for URLClassifier
  • TableProMobile/.../ConnectionFormView.swift — file picker now allows all 7 extensions instead of hardcoding sqlite3 only
  • CHANGELOG.md — one Fixed entry under Unreleased

Verification

  • Build clean (only pre-existing third-party SwiftLint failures, unrelated)
  • No banned filler in diff
  • No new dependencies, no new pasteboard or UTI declarations beyond extending an existing one

Test plan

  • Save a SQLite database with a .db extension (e.g., the Chinook sample). Right-click in Finder → Open With → TablePro is offered, not grayed out.
  • Same for .db3, .s3db, .sl3, .sqlitedb files.
  • Double-click any of the 7 extensions on a real SQLite file — TablePro opens it as a database connection (previously only .sqlite/.sqlite3 worked reliably).
  • On iOS, open the connection form and tap the SQLite file picker — .db files are now selectable.

@datlechin datlechin merged commit 66742b8 into main May 19, 2026
2 of 3 checks passed
@datlechin datlechin deleted the fix/1327-register-db-as-sqlite branch May 19, 2026 05:59
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.

.db not registered as SQLite document type — Finder "Open With" grays out TablePro

1 participant