Setup dev
and prod
databases with Prisma & Railway
#57
Labels
Milestone
dev
and prod
databases with Prisma & Railway
#57
Thing is, now we only have 1 database that's used in production and during local development.
Ideally we would have a setup like this:
.env
file only contains connection URL to thedev
databaseprod
databaseemail
column toStudent
table - I would typeprisma migrate dev -name "Added email column"
and this would create anemail
column only ondev
database. Theprod
database would remain unchanged.main
branch on GitHub (directly or PR)prisma migrate deploy
and that's it -email
field will show up onprod
database too...ONLY after we've actually made a push to GitHub. Until then,email
column only exists ondev
database.PS: Although we can run
prisma migrate deploy
locally, it's best to useprisma migrate dev
on our local machine and instead useprisma migrate deploy
only on our CI/CD pipeline.You can read more about this on: https://www.prisma.io/docs/guides/deployment/deploy-database-changes-with-prisma-migrate
What I Want Us To Do
.env
toprod
and update our local.env
to our newdev
databaseprisma migrate deploy
command on new changes tomain
branchThe text was updated successfully, but these errors were encountered: