From b20591108e5b25c8352dc32fafb3115d8bb8cc29 Mon Sep 17 00:00:00 2001 From: mARTin Date: Thu, 19 Mar 2026 09:42:27 +0100 Subject: [PATCH] fix: add migrations for 10 missing User columns viewSettings, weatherEnabled, weatherLat, weatherLon, weatherLocation, lightTheme, darkTheme, emailVerificationCode, mobileFontScale, and notificationsEnabled were in the Prisma schema but never had migrations, causing all profile saves to fail on the server. v1.51.4 Co-Authored-By: Claude Opus 4.6 --- package.json | 2 +- .../20260319_add_missing_user_columns/migration.sql | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 prisma/migrations/20260319_add_missing_user_columns/migration.sql diff --git a/package.json b/package.json index 0ae9f4c..266c2b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.51.3", + "version": "1.51.4", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "main": "index.js", "scripts": { diff --git a/prisma/migrations/20260319_add_missing_user_columns/migration.sql b/prisma/migrations/20260319_add_missing_user_columns/migration.sql new file mode 100644 index 0000000..7d2700e --- /dev/null +++ b/prisma/migrations/20260319_add_missing_user_columns/migration.sql @@ -0,0 +1,11 @@ +-- Add all missing User columns that were in schema but never migrated +ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "lightTheme" JSONB; +ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "darkTheme" JSONB; +ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "emailVerificationCode" TEXT; +ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "mobileFontScale" DOUBLE PRECISION NOT NULL DEFAULT 1.0; +ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "viewSettings" JSONB; +ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "weatherEnabled" BOOLEAN NOT NULL DEFAULT false; +ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "weatherLat" DOUBLE PRECISION; +ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "weatherLon" DOUBLE PRECISION; +ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "weatherLocation" TEXT; +ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "notificationsEnabled" BOOLEAN NOT NULL DEFAULT false;