Files
automation-based-email-list…/docs/data-model.md
T
2026-08-15 15:05:39 -06:00

1.3 KiB

Data model and CLI contract

All runtime state is private SQLite data. The schemas in schemas/ define stable boundary formats; schema_version: "1.0" is included in all machine-readable CLI results.

Database migrations

Migrations are numbered, committed with the application, and run transactionally by email-list system init. The CLI defaults to a non-mutating check; initialization has an explicit --dry-run plan mode.

The first migrations create subscriber state/history and idempotent operation records, campaign and authorization records, immutable recipient snapshots, individual send attempts, welcome attempts, durable follow-up schedules, and sanitized execution-receipt metadata.

State and privacy

The database path is EMAIL_LIST_DATA_DIR/email-list.sqlite. It must be on the VM's persistent private volume and is excluded from Git and Docker build context. Schema files and synthetic examples may be committed; real subscriber operations never are.

email-list backup create --dry-run --json previews the backup path. email-list backup create --json uses SQLite's backup API to write a consistent private backup under EMAIL_LIST_DATA_DIR/backups/. Scheduled retention/pruning will be added with the scheduler stage; v1 retains daily backups for 14 days.