import { prisma } from "../src/db/prisma.js"; // Single TRUNCATE ... CASCADE covers FK ordering and resets identity // sequences — used between tests/scenarios to start from a clean slate. export async function resetDatabase() { await prisma.$executeRawUnsafe(` TRUNCATE TABLE "user_profile_allergy", "allergy", "category", "planning_item", "planning", "recipe_ingredient", "step", "tech_step_mapping", "tech_step", "recipe", "ingredients", "sources", "user_profiles", "diet", "house" RESTART IDENTITY CASCADE; `); }