I'm currently working on a project that we are using Prisma 2 and postgreSQL as database support. From my understanding, whenever I made changes to the schema.prisma file and I want to migrate the changes to the database, I run prisma migrate dev
locally. Then I will push the auto created migration files under migration folder to Github, and then our repo will run prisma migrate deploy
to the staging or production server.
So, my concern is, each time I run prisma migrate dev
, a new migration file will be created in migrations folder. So, there will be a lot of migration files under the migration folder with the development of the project. Is that what supposed to happen? Or is there a better way?
Thank you for your help. I'm pretty new to Prisma 2 and still trying to find the correct way to work with it. BTW I think Prisma 1 was easier to use :)
pg_dump
or equivalent. prisma.io/docs/guides/database/developing-with-prisma-migrate/… – Warty