fix: Remove roomId from demo batches - foreign key references wrong table

This commit is contained in:
fullsizemalt 2026-01-12 11:47:31 -08:00
parent 3b9da95fd9
commit 08992257bf

View file

@ -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'
}
];