Hey all. I switched from TypeORM to Prisma, which ...
# orm-help
j
Hey all. I switched from TypeORM to Prisma, which required me to make an initial Prisma migration (see screenshot) that does things like drop the TypeORM migrations table, rename tables to mach Prisma naming conventions, etc. This all worked perfectly and now my prod system is working entirely in Prisma, no issues. However, now when I go to add a 2nd migration, I'm unable to because the shadow database starts empty, and it can't drop tables that don't exist, and the initial migration drops tables that already existed in my prod database:
Copy code
» npx prisma migrate dev --name add_config --create-only
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "xxx", schema "public" at "<http://xxx.b.db.ondigitalocean.com:25060|xxx.b.db.ondigitalocean.com:25060>"

Error: P3006

Migration `20220222031047_init` failed to apply cleanly to the shadow database. 
Error code: P1014
Error:
The underlying table for model `migrations` does not exist.
I'm at a loss for how to continue adding new migrations now.
I just noticed we are recommended to use GitHub for questions, so I created a question there: https://github.com/prisma/prisma/discussions/13459
n
Hey Jacob 👋 I can see that one of our team members suggested baselining, did it work for you?
j
Yes it did, thanks!