Commit graph

3 commits

Author SHA1 Message Date
5a309c8aca Add one-off participant import script for legacy MongoDB data
Parses the raw MongoDB shell/Compass export (comments + ObjectId(...)
calls, not valid JSON), maps navn/email/telefon/afmeldt to the new
Participant model, filters out known test rows, and upserts on
(route_id, lowercased email) so re-running is safe. Excludes the raw
export (old_participants.json) from version control since it contains
real participants' personal data.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-27 19:16:26 +02:00
d2abe70333 Define core domain models and add first Alembic migration
Nine SQLModel table models covering the Organization/Route hierarchy
(WineCategory, Organization, User, Route, Participant, PurchaseRound,
WineOffering, Order, OrderLine), with explicit tablenames, FK cascade
behavior, and a CHECK constraint preventing a PurchaseRound from
reaching open/closed status without its opens_at/order_deadline_at/
pickup_at dates set. Also fixes the Alembic script template to import
sqlmodel (needed for autogenerate's AutoString column type).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-27 18:51:04 +02:00
589dcbcdf5 Scaffold FastAPI + SQLModel + Alembic project, Postgres-backed
Config-driven DATABASE_URL shared by the app and Alembic's env.py
(fixes v1's config drift), psycopg3 driver, auto-discovering
app/models package for SQLModel.metadata, and a /health endpoint
that exercises the DB dependency end-to-end.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-27 15:57:44 +02:00