I am currently going through the upgrade from Pris...
# orm-help
b
I am currently going through the upgrade from Prisma1 to Prsima2 detailed here: https://www.prisma.io/docs/guides/upgrade-guides/upgrade-from-prisma-1/upgrading-the-prisma-layer-postgres and I am stuck on the part where I have to run the SQL queries (part 5). I have run the command
npx prisma-upgrade prisma1/prisma.yml prisma/schema.prisma
and have been given some SQL queries to run
Copy code
ALTER TABLE "my-app-dev$dev"."Answer" ALTER COLUMN "id" SET DATA TYPE character varying(30);
ALTER TABLE "my-app-dev$dev"."Answer" ALTER COLUMN "createdForQuestion" SET DATA TYPE character varying(30);
...
I have executed these queries in several different DB clients and every time I re-run
npx prisma-upgrade prisma1/prisma.yml prisma/schema.prisma
it still prints me the same SQL queries that I have to run. I have checked the varchar length in my tables after running the scripts and they seem to show the correct value (30). Shall I assume this is a bug and continue on from here? Or does this mean something is still not correct with the schema?e
n
Hey Ben, thanks for raising this! I'm pretty sure this is a bug in the Upgrade CLI and you should be able to just proceed. (If the types in the DB actually have been changed, then you can certainly proceed with the upgrade process.)
b
cool, thanks Nikolas
🙌 1
n
Let me know if you have any further questions along the way, always happy to help 🙂
b
Thanks Nik, I believe I will have another question with my final schema output similar to this one: https://github.com/prisma/upgrade/issues/90 am I ok to DM you my output schema for you to let me know the correct way to fix the errors?
n
Yes, definitely! Happy to take a look 👍