Files
HealthLog/prisma/migrations/0088_v160_delivery_form/migration.sql
T
Marc-André BombeckandClaude Opus 4.7 8ee7aaac44 chore(release): v1.6.0
Medication editor overhaul, route of administration, today-tile read-flip.

- Route-of-administration column (ORAL | INJECTION | OTHER) decoupled from
  treatmentClass; injection-site picker surfaces for any injection.
  Migration 0088 backfills ORAL via a constant column default.
- One-time injection (oneShot + deliveryForm = INJECTION) editor path.
- Profile-photo upload card on Settings → Account.
- Today-tile read-flip: /api/medications/intake?scope=today and
  /api/dashboard/summary gate through the canonical recurrence engine,
  matching the reminder worker for bi-weekly, rolling, RRULE, and one-time
  cadences.
- Measurement note cap 25 → 200; dashboard range colors on semantic tokens;
  admin sidebar icons + shared-helper consolidation; API-tokens multi-language
  snippets restored.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-30 00:10:12 +02:00

17 lines
770 B
SQL

-- v1.6.0 — route-of-administration on medications.
--
-- Adds `delivery_form` (ORAL | INJECTION | OTHER), decoupled from the
-- existing `treatment_class` discriminator. This lets the injection-site
-- picker surface for ANY injection dose (not only GLP-1) and gives the
-- one-time-injection shape a first-class flag (`one_shot = true` +
-- `delivery_form = INJECTION`).
--
-- Every existing row backfills to ORAL via the column default, so the
-- ADD COLUMN is a single non-blocking metadata operation on Postgres 11+
-- (the default is a constant, not a volatile expression).
CREATE TYPE "medication_delivery_form" AS ENUM ('ORAL', 'INJECTION', 'OTHER');
ALTER TABLE "medications"
ADD COLUMN "delivery_form" "medication_delivery_form" NOT NULL DEFAULT 'ORAL';