Skip to content

Make SQLite a first-class tested backend#273

Open
AnnoyingTechnology wants to merge 1 commit into
tchapi:mainfrom
AnnoyingTechnology:sqlite-first-class
Open

Make SQLite a first-class tested backend#273
AnnoyingTechnology wants to merge 1 commit into
tchapi:mainfrom
AnnoyingTechnology:sqlite-first-class

Conversation

@AnnoyingTechnology

@AnnoyingTechnology AnnoyingTechnology commented Jul 19, 2026

Copy link
Copy Markdown

Why

For the workload Davis serves, SQLite has concrete operational and technical advantages over a client/server DBMS:

  • no separate database daemon, listener, database account, or network protocol, which reduces both deployment complexity and attack surface
  • in-process reads without socket, connection-pool, or client/server round-trip overhead
  • straightforward backups through the SQLite backup API and filesystem snapshots
  • ample throughput for the predominantly read-heavy, modest-write-concurrency workload of a compact CalDAV/CardDAV deployment

The production examples and comparative measurements in SQLite does the job just fine illustrate these properties at substantially larger scales.

SQLite is already supported and documented by Davis, but it is not currently validated at the same level as MariaDB: the functional suite assumes a server database, SQLite receives migration coverage only, and the test bootstrap performs database provisioning that does not apply cleanly to SQLite.

This PR closes that gap and makes SQLite a first-class tested backend.

What changed

  • use SQLite as the default test database
  • make test schema setup driver-neutral and fail-fast
  • run the full PHP-version test matrix against SQLite
  • retain a MariaDB compatibility job
  • retain migration coverage for SQLite, MariaDB, and PostgreSQL
  • add a real HTTP CalDAV/CardDAV smoke test covering discovery, create, fetch, query, and delete
  • document SQLite first while preserving the existing production default

The PostgreSQL support level is unchanged. The sample driver name is corrected from postgresql to the Doctrine DBAL pgsql token.

Verification

  • PHPUnit: 59 tests, 406 assertions
  • end-to-end CalDAV and CardDAV smoke test against SQLite
  • Composer, YAML, PHP style, syntax, and whitespace checks

This does not remove or downgrade support for MariaDB or PostgreSQL.

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.

1 participant