How to create a baseline for an existing prod DB: question about "resolve" step

I followed the steps here but I'm left with a question: https://www.prisma.io/docs/orm/prisma-migrate/workflows/baselining Step 4 is to run prisma migrate resolve, which "adds the target migration to the _prisma_migrations table and marks it as applied. " That seems to be running against my local dev DB. Do I also need to somehow resolve the new basline migration on the prod DB, so that it won't try to re-apply the initial migration to the existing prod DB? Overall, I feel like these instructions applied to the local dev DB, but maybe the intent was to somehow point at the prod DB instead for these commands? Can someone clarify? More context: in development mode, I've been doing a "dangerous" db push to both dev and prod environments as I iterate rapidly, since I needed to make sure prod was working as well as local, but I didn't have users so it was fine to avoid migrations. Now I have users in prod so I need to be sure to do migrations going forward. At the moment both my local and prod prisma schemas are the same, and so I'm sure the created baseline is correct, but I feel like there must be both a local and a prod verison of the _prisma_migrations table, even though the docs didn't specify which one was involed.
Baselining a database | Prisma Documentation
How to initialize a migration history for an existing database that contains important data.
1 Reply
Prisma AI Help
You decided to hold for human wisdom. We'll chime in soon! Meanwhile, #ask-ai is there if you need a quick second opinion.

Did you find this page helpful?