Migrating database from sqlserver to postgresql

Hello all, I'm currently tasked with migrating our database schema from the sqlserver provider to postgresql. Not only that, the underlying database has new tables which weren't originally part of the database. If I run the db pull command it generates the schema as it should. The original schema has model names and column names in PascalCase. The new underlying postgresql database and subsequently, the schema is using all lowercase naming conventions. Is there a way to successfully modify the newly generated schema to allow using the newly created prisma client with the old PascalCase naming conventions? I'm aware of the @map && @@map functions but not quite sure if those are needed because the new postgres db has non case sensitive tables/columns. At first I attempted to modify by hand the new schema to reflect the same naming as in the original. After running the generate command which succeeded, when trying to run a query it complained about public.Members not existing in the database. If you have experience doing something similar I'd highly appreciate your thoughts. I'm attempting to create a post migration script which we can replay over the new schema in case we need to regenerate it again. It's not a solution for us to modify by hand every time. Please let me know if I'm over thinking it or if this is even possible. Thanks!
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server