import { prisma } from "@/lib/db"; async function main() { console.log('Checking database counts...'); try { const total = await prisma.guest.count(); const confirmed = await prisma.guest.count({ where: { OR: [ { rsvpStatus: 'ACCEPTED' }, { AND: [{ rsvpStatus: 'PENDING' }, { isAttending: true }] } ] } }); console.log(`Total Guests: ${total}`); console.log(`Confirmed Guests: ${confirmed}`); } catch (error) { console.error('Error querying database:', error); } } main() .catch(e => console.error(e)) .finally(async () => await prisma.$disconnect());