The full database schema and seed file for this exercise has already been implemented, your focus is on implementing a many-to-many and adding some API endpoints for it.
Note: Although we need to create a new primary database, we can reuse a shadow database across multiple projects since Prisma resets it after using it.
- Create a new database instance in ElephantSQL.
- Rename the
.env.example
file to.env
- Edit the
DATABASE_URL
variable in.env
, swappingYOUR_DATABASE_URL
for the URL of the database you just created. Leave?schema=prisma
at the end. - Edit the
SHADOW_DATABASE_URL
variable in.env
, swappingYOUR_SHADOW_DATABASE_URL
for the URL of the shadow database you created in the earlier exercises. Leave?schema=shadow
at the end. - Run
npm ci
to install the project dependencies. - Run
npx prisma migrate reset
to execute the existing migrations & data seed. Pressy
when it asks if you're sure.
- Work through each requirement in the
requirements
directory in numerical order