← Track projects
Track project · 10

Add Prisma without Losing the Database Mental Model

Map the known PostgreSQL design into Prisma, inspect generated SQL, and build persistent task operations safely.

Definition of done

What you are building

Deliverables

Build plan

Work through it one observable step at a time

  1. 01

    Model the existing tables in `schema.prisma`.

  2. 02

    Generate the client and inspect where generated types come from.

  3. 03

    Create PrismaService in NestJS and prove connection startup/shutdown behavior.

  4. 04

    Create a development migration and open the generated SQL before applying it.

  5. 05

    Seed realistic TaskFlow data.

  6. 06

    Implement one relation query and inspect its SQL/query count.

  7. 07

    Use a transaction for one multi-write operation.

  8. 08

    Simulate a dangerous NOT NULL change and rewrite it as expand → backfill → verify → contract.

  9. 09

    Document the production migration sequence separately from local `migrate dev`.

Evidence

Do not rely on “it seems to work”

Evidence to collect

Project exit ticket

Close the project only when these are true

Completion