vinindkoeb/migrations/versions
carsten bf0affcdc6 Add mail template CRUD (task 7a), per-route and per-event-type
MailTemplate holds subject + body_html with plain {{variable}}
placeholders (no loops/conditionals — the user edits these directly
and is comfortable generating list-shaped content like the wine
catalog in code instead, per the real "Kvitering" email reviewed in
old-emails/). One template per (route, event_type), matching the
three CLAUDE.md mail-events (round_announced, order_confirmed,
payment_confirmed); UNIQUE(route_id, event_type) enforces that and
IntegrityError is caught as 409, same pattern as prior tasks.

Route gains nullable sender_name/sender_email — the real old emails
show a per-route sender identity (e.g. "Finn Gram <finn@vinindkoeb.dk>"
for this route), so it lives on Route rather than being duplicated
across each of its templates.

This is data + CRUD only. Actual Postal sending, the round-announce
action, and per-participant send logging are task 7b; a Postal
webhook receiver for delivery status is task 7c — both need real
Postal API access, still to be arranged.

old-emails/ (real historical order/participant data) is gitignored,
same treatment as old_participants.json.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-28 19:43:47 +02:00
..
.gitkeep Scaffold FastAPI + SQLModel + Alembic project, Postgres-backed 2026-09-27 15:57:44 +02:00
7b5f332b7ab3_seed_wine_categories.py Add admin CRUD for purchase rounds and wine offerings, with round copy 2026-09-28 18:56:38 +02:00
31918c010919_add_core_domain_models.py Define core domain models and add first Alembic migration 2026-09-27 18:51:04 +02:00
237700c56d84_seed_initial_superuser.py Add simple JWT login for User 2026-09-27 22:23:25 +02:00
a6f09a1a4779_add_mail_templates_and_route_sender_info.py Add mail template CRUD (task 7a), per-route and per-event-type 2026-09-28 19:43:47 +02:00
ddf4dfafdc62_add_unique_constraint_on_participant_.py Add admin CRUD for participants (incl. active/inactive) 2026-09-28 13:05:08 +02:00