@josh-kostal/prisma
v0.0.35
Published
The database accessor for my fantasy soccer app
Downloads
39
Readme
Prisma project
This project contains our Postgres database schema, seed, and PrismaClient accessor.
Purpose
Putting these things in an NPM package allows us to reuse database accessor methods across our multiple backend services
Updating the schema
- First, make your required changes in
schema.prisma
- Then, run
npx prisma migrate dev --name {migration-name}
- When you're ready, publish the changes to NPM following the steps below
Updating the NPM package
- Make your desired changes in the
prisma
folder - Run
npm version patch
(or any of{newversion} | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git
) to up the version number accordingly - Run
npm publish
to publish the changes
Seeding your database
Run npx prisma migrate reset
Entity Relationship Diagram (ERD)
View file src/ERD.svg
. This updates every time npx prisma migrate dev
runs or when running npx prisma generate
.