Files
HealthLog/prisma/migrations/0093_v170_profile_identity_fields/migration.sql
T
Marc-André BombeckandClaude Opus 4.8 50e0a65228 chore(release): v1.7.0
v1.7.0 — health-record export (PDF + FHIR), flexible medication schedules, first-paint dashboard snapshot, full HealthKit coverage, offline sync delta feed, Coach data clustering. See CHANGELOG.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 14:36:17 +02:00

19 lines
953 B
SQL

-- v1.7.0 — optional patient-identity profile fields for the health-record export.
--
-- Surfaced on the doctor-handover PDF cover and the FHIR `Patient` resource:
-- * full_name — legal patient name (plaintext, like date_of_birth/gender)
-- * insurer_name — health-insurer display name (plaintext)
-- * insurance_number_encrypted — German KVNR, a quasi-identifier, stored
-- AES-256-GCM encrypted under the active
-- ENCRYPTION_KEYS entry (see src/lib/crypto.ts).
--
-- All three are nullable with no default, so each ADD COLUMN is a single
-- non-blocking metadata operation on Postgres 11+. Existing rows read NULL,
-- which the export cover + FHIR builder collapse exactly like an absent
-- practice name.
ALTER TABLE "users"
ADD COLUMN "full_name" TEXT,
ADD COLUMN "insurer_name" TEXT,
ADD COLUMN "insurance_number_encrypted" TEXT;