From fbb1173ea95fe57709af471a666c52b106e4a337 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 5 Feb 2026 13:58:11 +0100 Subject: [PATCH] Add migration for User.country column The country field was in the schema but missing its migration. This was causing user.get and user.me queries to fail. Co-Authored-By: Claude Opus 4.5 --- .../20260205200000_add_user_country/migration.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 prisma/migrations/20260205200000_add_user_country/migration.sql diff --git a/prisma/migrations/20260205200000_add_user_country/migration.sql b/prisma/migrations/20260205200000_add_user_country/migration.sql new file mode 100644 index 0000000..a8e29b1 --- /dev/null +++ b/prisma/migrations/20260205200000_add_user_country/migration.sql @@ -0,0 +1,12 @@ +-- Add country column to User table +-- This is used for mentor matching and geographic filtering + +DO $$ +BEGIN + IF NOT EXISTS ( + SELECT 1 FROM information_schema.columns + WHERE table_name = 'User' AND column_name = 'country' + ) THEN + ALTER TABLE "User" ADD COLUMN "country" TEXT; + END IF; +END $$;