Files
HealthLog/prisma/migrations/0197_coach_plan_outcome/migration.sql
T
Marc-André Bombeck ee4fa55c1e fix(db): target the users table in the v1.22 AI-settings migration
The AI-settings migration altered "User" but the table is "users"; deploy
would abort with relation "User" does not exist. Correct the identifier and
make both v1.22 column additions rerun-safe with IF NOT EXISTS.
2026-06-27 15:46:03 +02:00

7 lines
457 B
SQL

-- v1.22 (W9, C2) — n-of-1 experiment outcome read-back, encrypted at rest.
-- An "experiment" is a CoachPlan with a reviewDate; when its review is
-- processed, the grounded before/after result is written here. Additive,
-- nullable Bytes column — no backfill, no enum change (the new statuses
-- review_due / reviewed are app-side strings on the existing `status` column).
ALTER TABLE "coach_plans" ADD COLUMN IF NOT EXISTS "outcome_encrypted" BYTEA;