0003. No database: access, schedules and linking are files
- Status: accepted
- Date: 2026-10-08
- Issue: #15
Context
The first architecture draft deferred a database until account linking or grants needed one. Issues #15 (PostgreSQL) and #18 (database-backed /access commands) sketched Azure Flexible Server, migrations and an audit table.
Phase 1 is a single replica. Access is already YAML. Admin commands (#25) rewrite members.yaml through an AccessStore port. Schedules need durable state that survives a deploy. Linking across platforms (#16) only needs a second id on an existing person.
Decision
- There is no database. Access, schedules and planned account linking are files. Do not add Postgres because an old issue said so.
members.yamlis bot-managed on a writable Azure Files volume.admins.yamlstays a read-only Key Vault secret.schedules.yamllives inPIXEL_DATA_DIRon the same volume. Unlike the rest ofdata/, it is not safe to delete.- Account linking will write
telegram:<id>(and later others) onto the person'smembers.yamlentry through the access store. One-time codes stay in memory. No Postgres for that either. - The
AccessStoreport means a database could still replace the file later. That swap is not planned.
Consequences
- One replica is enough. A database lock is not a plan for keeping a single instance (#11).
- Volume snapshots back up
members.yamland schedules. Admin-file history is Key Vault versions or a private repo (still an open question). - #18 closed: admin grant/revoke is
/admin leveland/admin capabilitieson the file. #15 closed without a server.