fix: add missing migration for auto-MH-check fields and drop dead lab_rx_template column

schema.prisma had autoMhCheckEnabled/DayOfWeek/Hour on User (added in
fc3e8c0e) with no corresponding migration, so migrate deploy on a fresh
DB left those columns missing and broke seeding. Also drops
lab_rx_template.doctorName, a column that existed only in the DB (added
by an old migration) but was never in schema.prisma or referenced by
any app code.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Gitead
2026-07-30 18:38:11 -04:00
parent 76bd99f7ff
commit 3f83794ac5

View File

@@ -0,0 +1,16 @@
/*
Warnings:
- You are about to drop the column `doctorName` on the `lab_rx_template` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "Patient" ALTER COLUMN "updatedAt" DROP DEFAULT;
-- AlterTable
ALTER TABLE "User" ADD COLUMN "autoMhCheckDayOfWeek" INTEGER NOT NULL DEFAULT 1,
ADD COLUMN "autoMhCheckEnabled" BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN "autoMhCheckHour" INTEGER NOT NULL DEFAULT 13;
-- AlterTable
ALTER TABLE "lab_rx_template" DROP COLUMN "doctorName";