Skip to content

Serve the config database from SQL - #535

Open
uw4 wants to merge 1 commit into
masterfrom
config-in-sql-v2
Open

uw4 wants to merge 1 commit into
masterfrom
config-in-sql-v2

Conversation

@uw4

@uw4 uw4 commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

When dashjoin.configdb.url is set, the config database is stored in one SQL table (dj_config) instead of the model folder, so several instances can share it. Layers: app (model folder of a git commit, read-only), local (runtime changes, deletion markers) and effective (the merged result, maintained on every write in the same transaction). Reads and queries are served from the merged records; on PostgreSQL, filters, sorting and paging run in SQL.

  • SqlConfigStore: tables, transactions and record locks (advisory locks on PostgreSQL), import of the git checkout, app sync, merged records, rebuild when the platform defaults change
  • JSONSqlDatabase: one layer; SqlConfigView: the injected config database (reads merged records, writes the local layer)
  • $appSync(dryRun?) updates the app layer; $gitPull() does the same in this mode
  • UnionDatabase, Services, PojoDatabase: small hooks

When dashjoin.configdb.url is set, the config database is stored in one
SQL table (dj_config) instead of the model folder, so several instances
can share it. Layers: app (model folder of a git commit, read-only),
local (runtime changes, deletion markers) and effective (the merged
result, maintained on every write in the same transaction). Reads and
queries are served from the merged records; on PostgreSQL, filters,
sorting and paging run in SQL.

- SqlConfigStore: tables, transactions and record locks (advisory locks
  on PostgreSQL), import of the git checkout, app sync, merged records,
  rebuild when the platform defaults change
- JSONSqlDatabase: one layer; SqlConfigView: the injected config
  database (reads merged records, writes the local layer)
- $appSync(dryRun?) updates the app layer; $gitPull() does the same in
  this mode
- UnionDatabase, Services, PojoDatabase: small hooks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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