The schema is SQLite-only, self-hosting included - #2
Merged
Conversation
ADR-0005 rejected PostgreSQL and left the door open, recording that no SQLite-only schema feature was in use so a move would stay a framework-level concern. That stopped being true and nothing tested it. Walking the self-hosting instructions on a clean machine surfaced it: the shipped deploy/server/ stack runs postgres:16-alpine, and migrate fails on the first substantive table with a syntax error at "NEW" — the transactions enum-guard trigger is SQLite syntax. Thirty-two migrations use RAISE(ABORT) triggers, and search is an FTS5 virtual table. The triggers would port mechanically. FTS5 would not: full-text search would have to be rebuilt on tsvector, with its own indexing, ranking and index migration. That is a project, in service of a use case nobody has asked for — one household is not a workload SQLite struggles with. ADR-0022 records SQLite as the only supported database in every shape and withdraws the Postgres and MySQL options from the deployment guide, which described something that could not work. ADR-0005's decision is unchanged and reinforced; only its portability claim is superseded, and the two records now point at each other. Signed-off-by: Wessel Verheij <info@nightworks.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Walking the self-hosting instructions on a clean machine found that the
documented "Docker Compose (recommended)" path cannot work. The shipped
deploy/server/stack runspostgres:16-alpine, andartisan migrateagainst it fails on the first substantive table:
That contradicts a claim in ADR-0005 — "the migration path is preserved: no
SQLite-only schema feature is used". A survey found 32 migrations using
RAISE(ABORT)triggers plus an FTS5 virtual table for search.The triggers would port mechanically. FTS5 would not — search would need
rebuilding on
tsvector. ADR-0022 takes the honest position the code alreadytakes: SQLite everywhere, and the Postgres/MySQL options withdrawn.
ADR-0005's decision is unchanged and reinforced; only its portability claim is
superseded, and the records link both ways per GOV-R9.
Merges before the product-repo change that fixes the deployment guide and
rebuilds
deploy/server/on SQLite.