-
Notifications
You must be signed in to change notification settings - Fork 16
Home
During our initial "development" period, we've been using prisma db push
to quickly iterate on our schema. Now that we have users in production, some schema changes will prompt a reset of the database when we still use prisma db push
. This is why from now on moving forward, all changes in schema.prisma
should run prisma migrate dev
and resolve any conflicts with current schema.
prisma migrate dev
will create a folder under prisma/migrations/
describing the added/removed things from the current schema -> new schema.
We should ideally have a github workflow that automatically runs prisma migrate deploy
whenever a push happens in main
branch. prisma migrate deploy
will apply pending migrations to the production database. We should also have a workflow for dev
branch which would have separate env
variables for DATABASE_URL