const { PrismaClient } = require("@prisma/client"); const prisma = new PrismaClient(); async function main() { await prisma.contentBlock.deleteMany({where:{section:{chapter:{subject:{learningPathId:4}}}}}); await prisma.section.deleteMany({where:{chapter:{subject:{learningPathId:4}}}}}); await prisma.chapter.deleteMany({where:{subject:{learningPathId:4}}}}); await prisma.subject.deleteMany({where:{learningPathId:4}}); await prisma.learningPath.delete({where:{id:4}}); console.log("Done"); } main().then(()=>prisma.$disconnect()).catch(e=>{console.error(e);prisma.$disconnect();process.exit(1);});