Join our community

Get access to the complete guide to developing and deploying fast, production-ready Nuxt apps.

5-10 Creating the Prisma Schema

In this lesson we look at what the Prisma schema does, how it works, and then we create our own.

Prisma schema files are responsible for describing the schema of our database, but it also describes the types that will be generated for our app. Prisma keeps these two pieces in sync for us, so our data is type safe from database through to our app.

UPDATE, December 2023: Supabase has switched from using pgbouncer to Supavisor, so our schema is altered slightly in the code repo. You must still use the “?pgbouncer=true” at the end of your DB URL though!

UPDATE, March 2023: If you’re having issues deploying Prisma, it might be the schema:

  • Try removing the binaryTargets line
  • Try removing the output line

Prisma schema: https://www.prisma.io/docs/concepts/components/prisma-schema