Hyo
01/07/2021, 11:57 AMprisma migrate dev
and prisma migrate deploy
to update our remote database and this should be done before merging the PR
since the queries won’t work without it. The sourcecode will be deployed to production when merged to master. The problem is, when we run prisma migrate dev
the prompt appears (Type in migration name) and we need to type in something to apply it. Should we run it before pushing the commits to branch
that would be merged to master
?
Currently, in our opensource project (https://github.com/dooboolab/hackatalk), we are doing prisma migrate dev
and prisma migrate deploy
locally when we updates schema.ts
but I am wondering if this could be done over the air.Joël
prisma migrate dev
locally, it will detect changes, create a migration and apply it
• Commit the migration files to Git
• In CI / production run prisma migrate deploy
it will check if there are migrations to apply and apply themJoël
Alberto Perdomo
prisma migrate dev
to iterate on the schema and create migrations and update your development database, then you commit these migrations to a branch, after merging the branch you just need to run prisma migrate deploy
from your master/main/deploy branch against the production database.Hyo
01/08/2021, 8:46 PM