Exercise 3: Full Item vs. ID Only, and the Migration Step — Possible Solution ==================================================================== WHY THIS COURSE'S POST ROUTE CAN RETURN THE FULL ITEM ------------------------------ Prisma Client's create() method returns the complete row it just inserted by default — every scalar field, including the id the database just generated. The sibling course's better-sqlite3 INSERT statement, by contrast, only hands back a result object containing lastInsertRowid; a raw INSERT doesn't give you the row's other fields back automatically, so the sibling's route can only respond with the new id and nothing else. THE STEP THAT HAS TO HAPPEN BEFORE A SCHEMA CHANGE TAKES EFFECT ------------------------------ Editing schema.prisma alone changes nothing. Before Prisma Client's generated methods reflect a new or changed field, an actual migration has to run — npx prisma migrate dev --name — which generates the real SQL for that change, applies it to the database, and regenerates Prisma Client to match. Skipping this step and trying to use a field that only exists in schema.prisma (not yet migrated) produces a confusing error that has nothing to do with a mistake in the route code itself. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly explains create()'s own default return behavior as the real reason behind the full-item response, rather than attributing it to some other cause, and it names the actual missing step (running a real migration) rather than just saying "the schema needs to be applied" without saying how.