Exercise 3: A .gitignore and a Re-Runnable Script — Possible Solution ======================================================================= .gitignore: node_modules/ # installed packages; recreated with npm install .env # database URLs and passwords — never commit secrets generated/ # the generated Prisma Client; recreated with # npx prisma generate, and specific to this machine *.db # the SQLite database file (your local data) *.db-journal # SQLite's temporary journal file Do commit prisma/schema.prisma, prisma/migrations/, the config file, package.json and package-lock.json: they describe the project, and another developer needs them to recreate it. A tip: commit a .env.example with a placeholder value, so others know which variables to set. Making script.ts safe to run twice — use upsert (covered properly in Chapter 5), which updates the row if it exists and creates it if not: const user = await prisma.user.upsert({ where: { email: "ada@example.com" }, update: {}, create: { email: "ada@example.com", name: "Ada" }, }); Running the script again now finds the existing Ada instead of failing on the unique email. WHY THIS WORKS AS AN ANSWER ------------------------------ It separates files you can regenerate or must keep private from files that define the project, and fixes the duplicate-email failure the chapter pointed out without deleting any data.