docs
docs copied to clipboard
Adding workflow to allow creating initial migrations for baselining without resetting development database
In the Baselining documentation, we have a requirement that it's necessary to reset the development database: Documentation Link.
In certain cases, users cannot reset their development database as well.
To address this concern, I came across this comment on one of the related issue which suggests using migrate diff commands to create initial migration without needing to reset the development database.
Should we add these commands in docs or maybe add a workflow in docs which would allow generating initial migrations without needing to reset the database?
The actual problem is this here? https://www.prisma.io/docs/guides/database/developing-with-prisma-migrate/add-prisma-migrate-to-a-project#apply-the-initial-migrations
Yes, the actual problem is that to generate initial migrations we require a reset of the development database.
Here's another instance of this issue cropping up. The user tried to follow our baseline docs but was wary of resetting their DB.
The prisma migrate diff workflow is really useful and should be added to the docs when possible, in my opinion.
Another instance of community slack user running into this.
Our getting started has already been changed to use migrate diff, we can do the same here (although we need to figure out in which use cases migrate dev --create-only is actually better).
Done: https://www.prisma.io/docs/getting-started/setup-prisma/add-to-existing-project/relational-databases/baseline-your-database-typescript-postgres