From 08992257bfe3f30db8a6792dccbf2bbd749706e7 Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Mon, 12 Jan 2026 11:47:31 -0800 Subject: [PATCH] fix: Remove roomId from demo batches - foreign key references wrong table --- backend/prisma/seed.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/backend/prisma/seed.ts b/backend/prisma/seed.ts index ab9b4dc..c1964a4 100644 --- a/backend/prisma/seed.ts +++ b/backend/prisma/seed.ts @@ -288,8 +288,6 @@ async function main() { // DEMO BATCHES // ============================================ const owner = await prisma.user.findUnique({ where: { email: ownerEmail } }); - const flowerRoom = await prisma.facilityRoom.findFirst({ where: { code: 'FLO' } }); - const vegRoom = await prisma.facilityRoom.findFirst({ where: { code: 'VEG' } }); const demoBatches = [ { @@ -299,8 +297,7 @@ async function main() { status: 'ACTIVE', plantCount: 48, source: 'CLONE', - stage: 'FLOWERING', - roomId: flowerRoom?.id + stage: 'FLOWERING' }, { name: 'B-2025-12-KM', @@ -319,8 +316,7 @@ async function main() { status: 'ACTIVE', plantCount: 24, source: 'SEED', - stage: 'VEGETATIVE', - roomId: vegRoom?.id + stage: 'VEGETATIVE' } ];