Commit graph

2 commits

Author SHA1 Message Date
e9eb98119f feat: migrate database driver from MariaDB to PostgreSQL
Switch from pymysql to psycopg2-binary, update connection string to
postgresql+psycopg2, replace MySQL-specific JSON imports with generic
SQLAlchemy JSON, convert MySQL prefix index to PostgreSQL left() function,
and remove FetchedValue() (unnecessary with PostgreSQL).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 08:25:05 +00:00
e7befe78b6 feat: SQLAlchemy models for users, cases, reports, audit
11 models across 4 files matching the MariaDB schema:
- user.py: User, RefreshToken, InvitationLink, AllowedDomain
- case.py: Case, CaseICDCode
- report.py: WeeklyReport, YearlySummary
- audit.py: ImportLog, AuditLog, Notification

All CHECK constraints, indexes (incl. prefix index), foreign keys,
and server defaults match the SQL DDL specification exactly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 07:28:33 +00:00